1// Copyright 2025 International Digital Economy Academy
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15///|
16extern "c" fn strerror_r(err : 
Int
Int
, bytes :
Bytes
Bytes
) = "moonbit_uv_strerror_r"
17 18///| 19fn
(errno : Int) -> @string.StringView
strerror
(
Int
errno
:
Int
Int
) ->
type @string.StringView

A @string.View represents a view of a String that maintains proper Unicode character boundaries. It allows safe access to a substring while handling multi-byte characters correctly.

@string.View
{
20 let
Bytes
bytes
=
(Int, Byte) -> Bytes
Bytes::
(len : Int, init : Byte) -> Bytes

Creates a new byte sequence of the specified length, where each byte is initialized to the given value. Returns an empty byte sequence if the length is negative.

Parameters:

  • length : The length of the byte sequence to create. Must be non-negative.
  • initial_value : The byte value used to initialize each position in the sequence.

Example:

  let bytes = Bytes::make(3, b'\xFF')
  inspect(bytes, content=
  #|b"\xff\xff\xff"
)
  let empty = Bytes::make(0, b'\x00')
  inspect(empty, content="b\"\"")
make
(256, 0)
21
(err : Int, bytes : Bytes) -> Unit
strerror_r
(
Int
errno
,
Bytes
bytes
)
22 let
@buffer.T
buffer
=
(size_hint~ : Int = ..) -> @buffer.T

Creates a new extensible buffer with specified initial capacity. If the initial capacity is less than 1, the buffer will be initialized with capacity 1.

Parameters:

  • size_hint : Initial capacity of the buffer in bytes. Defaults to 0.

Returns a new buffer of type T.

Example:

  let buf = @buffer.new(size_hint=10)
  inspect(buf.length(), content="0")
  buf.write_string("test")
  inspect(buf.length(), content="8")
@buffer.new
()
23 for
Byte
byte
in
Bytes
bytes
{
24 if
Byte
byte
(self : Byte, that : Byte) -> Bool

Compares two Byte values for equality.

Parameters:

  • self : The first Byte value to compare.
  • that : The second Byte value to compare.

Returns true if the two Byte values are equal, otherwise false.

==
0 {
25 break 26 } 27
@buffer.T
buffer
.
(self : @buffer.T, value : Byte) -> Unit

Writes a single byte to the end of the buffer. The buffer will automatically grow if necessary to accommodate the new byte.

Parameters:

  • buffer : The buffer to write to.
  • byte : The byte value to be written.

Example:

  let buf = @buffer.new()
  buf.write_byte(b'\x41')
  inspect(buf.contents(), content="b\"\\x41\"")
write_byte
(
Byte
byte
)
28 } 29
(encoding~ : @encoding.Encoding, input : @bytes.View) -> String
@encoding.decode_lossy
(
@encoding.Encoding
encoding
=
@encoding.Encoding
UTF8
,
@buffer.T
buffer
.
(self : @buffer.T) -> Bytes

Returns a copy of the buffer's contents as a Bytes object. The returned bytes will have the same length as the buffer.

Parameters:

  • buffer : The buffer whose contents will be converted to bytes.

Returns a Bytes object containing a copy of the buffer's contents.

Example:

  let buf = @buffer.new()
  buf.write_string("Test")
  let bytes = buf.to_bytes()
  inspect(bytes.length(), content="8")
to_bytes
())
30} 31 32///| 33#visibility(change_to="readonly") 34pub(all) enum Status { 35
Status
E2BIG
36
Status
EACCES
37
Status
EADDRINUSE
38
Status
EADDRNOTAVAIL
39
Status
EAFNOSUPPORT
40
Status
EAGAIN
41
Status
EAI_ADDRFAMILY
42
Status
EAI_AGAIN
43
Status
EAI_BADFLAGS
44
Status
EAI_BADHINTS
45
Status
EAI_CANCELED
46
Status
EAI_FAIL
47
Status
EAI_FAMILY
48
Status
EAI_MEMORY
49
Status
EAI_NODATA
50
Status
EAI_NONAME
51
Status
EAI_OVERFLOW
52
Status
EAI_PROTOCOL
53
Status
EAI_SERVICE
54
Status
EAI_SOCKTYPE
55
Status
EALREADY
56
Status
EBADF
57
Status
EBUSY
58
Status
ECANCELED
59
Status
ECHARSET
60
Status
ECONNABORTED
61
Status
ECONNREFUSED
62
Status
ECONNRESET
63
Status
EDESTADDRREQ
64
Status
EEXIST
65
Status
EFAULT
66
Status
EFBIG
67
Status
EHOSTUNREACH
68
Status
EINTR
69
Status
EINVAL
70
Status
EIO
71
Status
EISCONN
72
Status
EISDIR
73
Status
ELOOP
74
Status
EMFILE
75
Status
EMSGSIZE
76
Status
ENAMETOOLONG
77
Status
ENETDOWN
78
Status
ENETUNREACH
79
Status
ENFILE
80
Status
ENOBUFS
81
Status
ENODEV
82
Status
ENOENT
83
Status
ENOMEM
84
Status
ENONET
85
Status
ENOPROTOOPT
86
Status
ENOSPC
87
Status
ENOSYS
88
Status
ENOTCONN
89
Status
ENOTDIR
90
Status
ENOTEMPTY
91
Status
ENOTSOCK
92
Status
ENOTSUP
93
Status
EOVERFLOW
94
Status
EPERM
95
Status
EPIPE
96
Status
EPROTO
97
Status
EPROTONOSUPPORT
98
Status
EPROTOTYPE
99
Status
ERANGE
100
Status
EROFS
101
Status
ESHUTDOWN
102
Status
ESPIPE
103
Status
ESRCH
104
Status
ETIMEDOUT
105
Status
ETXTBSY
106
Status
EXDEV
107
Status
UNKNOWN
108
Status
EOF
109
Status
ENXIO
110
Status
EMLINK
111
Status
EHOSTDOWN
112
Status
EREMOTEIO
113
Status
ENOTTY
114
Status
EFTYPE
115
Status
EILSEQ
116
Status
ESOCKTNOSUPPORT
117
Status
ENODATA
118
Status
EUNATCH
119
Status
ENOEXEC
120} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Hash {
  hash_combine(Self, Hasher) -> Unit
  hash(Self) -> Int
}

Trait for types that can be hashed

Hash
)
121 122///| 123pub suberror Errno
enum Status {
  E2BIG
  EACCES
  EADDRINUSE
  EADDRNOTAVAIL
  EAFNOSUPPORT
  EAGAIN
  EAI_ADDRFAMILY
  EAI_AGAIN
  EAI_BADFLAGS
  EAI_BADHINTS
  EAI_CANCELED
  EAI_FAIL
  EAI_FAMILY
  EAI_MEMORY
  EAI_NODATA
  EAI_NONAME
  EAI_OVERFLOW
  EAI_PROTOCOL
  EAI_SERVICE
  EAI_SOCKTYPE
  EALREADY
  EBADF
  EBUSY
  ECANCELED
  ECHARSET
  ECONNABORTED
  ECONNREFUSED
  ECONNRESET
  EDESTADDRREQ
  EEXIST
  EFAULT
  EFBIG
  EHOSTUNREACH
  EINTR
  EINVAL
  EIO
  EISCONN
  EISDIR
  ELOOP
  EMFILE
  EMSGSIZE
  ENAMETOOLONG
  ENETDOWN
  ENETUNREACH
  ENFILE
  ENOBUFS
  ENODEV
  ENOENT
  ENOMEM
  ENONET
  ENOPROTOOPT
  ENOSPC
  ENOSYS
  ENOTCONN
  ENOTDIR
  ENOTEMPTY
  ENOTSOCK
  ENOTSUP
  EOVERFLOW
  EPERM
  EPIPE
  EPROTO
  EPROTONOSUPPORT
  EPROTOTYPE
  ERANGE
  EROFS
  ESHUTDOWN
  ESPIPE
  ESRCH
  ETIMEDOUT
  ETXTBSY
  EXDEV
  UNKNOWN
  EOF
  ENXIO
  EMLINK
  EHOSTDOWN
  EREMOTEIO
  ENOTTY
  EFTYPE
  EILSEQ
  ESOCKTNOSUPPORT
  ENODATA
  EUNATCH
  ENOEXEC
}
Status
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Hash {
  hash_combine(Self, Hasher) -> Unit
  hash(Self) -> Int
}

Trait for types that can be hashed

Hash
)
124 125///| 126let
Map[Errno, @string.StringView]
errno_messages
:
type Map[K, V]

Mutable linked hash map that maintains the order of insertion, not thread safe.

Example

  let map = { 3: "three", 8 :  "eight", 1 :  "one"}
  assert_eq(map.get(2), None)
  assert_eq(map.get(3), Some("three"))
  map.set(3, "updated")
  assert_eq(map.get(3), Some("updated"))
Map
[
type! Errno Status
Errno
,
type @string.StringView

A @string.View represents a view of a String that maintains proper Unicode character boundaries. It allows safe access to a substring while handling multi-byte characters correctly.

@string.View
] =
type Map[K, V]

Mutable linked hash map that maintains the order of insertion, not thread safe.

Example

  let map = { 3: "three", 8 :  "eight", 1 :  "one"}
  assert_eq(map.get(2), None)
  assert_eq(map.get(3), Some("three"))
  map.set(3, "updated")
  assert_eq(map.get(3), Some("updated"))
Map
::
(capacity~ : Int = ..) -> Map[Errno, @string.StringView]

Create a hash map. The capacity of the map will be the smallest power of 2 that is greater than or equal to the provided [capacity].

new
()
127 128///| 129let
Map[Int, Errno]
errno_errors
:
type Map[K, V]

Mutable linked hash map that maintains the order of insertion, not thread safe.

Example

  let map = { 3: "three", 8 :  "eight", 1 :  "one"}
  assert_eq(map.get(2), None)
  assert_eq(map.get(3), Some("three"))
  map.set(3, "updated")
  assert_eq(map.get(3), Some("updated"))
Map
[
Int
Int
,
type! Errno Status
Errno
] =
type Map[K, V]

Mutable linked hash map that maintains the order of insertion, not thread safe.

Example

  let map = { 3: "three", 8 :  "eight", 1 :  "one"}
  assert_eq(map.get(2), None)
  assert_eq(map.get(3), Some("three"))
  map.set(3, "updated")
  assert_eq(map.get(3), Some("updated"))
Map
::
(capacity~ : Int = ..) -> Map[Int, Errno]

Create a hash map. The capacity of the map will be the smallest power of 2 that is greater than or equal to the provided [capacity].

new
()
130 131///| 132let
Map[Errno, Int]
errno_values
:
type Map[K, V]

Mutable linked hash map that maintains the order of insertion, not thread safe.

Example

  let map = { 3: "three", 8 :  "eight", 1 :  "one"}
  assert_eq(map.get(2), None)
  assert_eq(map.get(3), Some("three"))
  map.set(3, "updated")
  assert_eq(map.get(3), Some("updated"))
Map
[
type! Errno Status
Errno
,
Int
Int
] =
type Map[K, V]

Mutable linked hash map that maintains the order of insertion, not thread safe.

Example

  let map = { 3: "three", 8 :  "eight", 1 :  "one"}
  assert_eq(map.get(2), None)
  assert_eq(map.get(3), Some("three"))
  map.set(3, "updated")
  assert_eq(map.get(3), Some("updated"))
Map
::
(capacity~ : Int = ..) -> Map[Errno, Int]

Create a hash map. The capacity of the map will be the smallest power of 2 that is greater than or equal to the provided [capacity].

new
()
133 134///| 135fn init { 136
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_E2BIG()] =
(Status) -> Errno
Errno
(
Status
E2BIG
)
137
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EACCES()] =
(Status) -> Errno
Errno
(
Status
EACCES
)
138
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EADDRINUSE()] =
(Status) -> Errno
Errno
(
Status
EADDRINUSE
)
139
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EADDRNOTAVAIL()] =
(Status) -> Errno
Errno
(
Status
EADDRNOTAVAIL
)
140
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAFNOSUPPORT()] =
(Status) -> Errno
Errno
(
Status
EAFNOSUPPORT
)
141
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAGAIN()] =
(Status) -> Errno
Errno
(
Status
EAGAIN
)
142
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_ADDRFAMILY()] =
(Status) -> Errno
Errno
(
Status
EAI_ADDRFAMILY
)
143
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_AGAIN()] =
(Status) -> Errno
Errno
(
Status
EAI_AGAIN
)
144
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_BADFLAGS()] =
(Status) -> Errno
Errno
(
Status
EAI_BADFLAGS
)
145
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_BADHINTS()] =
(Status) -> Errno
Errno
(
Status
EAI_BADHINTS
)
146
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_CANCELED()] =
(Status) -> Errno
Errno
(
Status
EAI_CANCELED
)
147
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_FAIL()] =
(Status) -> Errno
Errno
(
Status
EAI_FAIL
)
148
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_FAMILY()] =
(Status) -> Errno
Errno
(
Status
EAI_FAMILY
)
149
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_MEMORY()] =
(Status) -> Errno
Errno
(
Status
EAI_MEMORY
)
150
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_NODATA()] =
(Status) -> Errno
Errno
(
Status
EAI_NODATA
)
151
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_NONAME()] =
(Status) -> Errno
Errno
(
Status
EAI_NONAME
)
152
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_OVERFLOW()] =
(Status) -> Errno
Errno
(
Status
EAI_OVERFLOW
)
153
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_PROTOCOL()] =
(Status) -> Errno
Errno
(
Status
EAI_PROTOCOL
)
154
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_SERVICE()] =
(Status) -> Errno
Errno
(
Status
EAI_SERVICE
)
155
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EAI_SOCKTYPE()] =
(Status) -> Errno
Errno
(
Status
EAI_SOCKTYPE
)
156
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EALREADY()] =
(Status) -> Errno
Errno
(
Status
EALREADY
)
157
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EBADF()] =
(Status) -> Errno
Errno
(
Status
EBADF
)
158
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EBUSY()] =
(Status) -> Errno
Errno
(
Status
EBUSY
)
159
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ECANCELED()] =
(Status) -> Errno
Errno
(
Status
ECANCELED
)
160
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ECHARSET()] =
(Status) -> Errno
Errno
(
Status
ECHARSET
)
161
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ECONNABORTED()] =
(Status) -> Errno
Errno
(
Status
ECONNABORTED
)
162
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ECONNREFUSED()] =
(Status) -> Errno
Errno
(
Status
ECONNREFUSED
)
163
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ECONNRESET()] =
(Status) -> Errno
Errno
(
Status
ECONNRESET
)
164
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EDESTADDRREQ()] =
(Status) -> Errno
Errno
(
Status
EDESTADDRREQ
)
165
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EEXIST()] =
(Status) -> Errno
Errno
(
Status
EEXIST
)
166
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EFAULT()] =
(Status) -> Errno
Errno
(
Status
EFAULT
)
167
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EFBIG()] =
(Status) -> Errno
Errno
(
Status
EFBIG
)
168
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EHOSTUNREACH()] =
(Status) -> Errno
Errno
(
Status
EHOSTUNREACH
)
169
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EINTR()] =
(Status) -> Errno
Errno
(
Status
EINTR
)
170
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EINVAL()] =
(Status) -> Errno
Errno
(
Status
EINVAL
)
171
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EIO()] =
(Status) -> Errno
Errno
(
Status
EIO
)
172
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EISCONN()] =
(Status) -> Errno
Errno
(
Status
EISCONN
)
173
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EISDIR()] =
(Status) -> Errno
Errno
(
Status
EISDIR
)
174
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ELOOP()] =
(Status) -> Errno
Errno
(
Status
ELOOP
)
175
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EMFILE()] =
(Status) -> Errno
Errno
(
Status
EMFILE
)
176
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EMSGSIZE()] =
(Status) -> Errno
Errno
(
Status
EMSGSIZE
)
177
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENAMETOOLONG()] =
(Status) -> Errno
Errno
(
Status
ENAMETOOLONG
)
178
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENETDOWN()] =
(Status) -> Errno
Errno
(
Status
ENETDOWN
)
179
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENETUNREACH()] =
(Status) -> Errno
Errno
(
Status
ENETUNREACH
)
180
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENFILE()] =
(Status) -> Errno
Errno
(
Status
ENFILE
)
181
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOBUFS()] =
(Status) -> Errno
Errno
(
Status
ENOBUFS
)
182
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENODEV()] =
(Status) -> Errno
Errno
(
Status
ENODEV
)
183
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOENT()] =
(Status) -> Errno
Errno
(
Status
ENOENT
)
184
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOMEM()] =
(Status) -> Errno
Errno
(
Status
ENOMEM
)
185
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENONET()] =
(Status) -> Errno
Errno
(
Status
ENONET
)
186
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOPROTOOPT()] =
(Status) -> Errno
Errno
(
Status
ENOPROTOOPT
)
187
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOSPC()] =
(Status) -> Errno
Errno
(
Status
ENOSPC
)
188
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOSYS()] =
(Status) -> Errno
Errno
(
Status
ENOSYS
)
189
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOTCONN()] =
(Status) -> Errno
Errno
(
Status
ENOTCONN
)
190
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOTDIR()] =
(Status) -> Errno
Errno
(
Status
ENOTDIR
)
191
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOTEMPTY()] =
(Status) -> Errno
Errno
(
Status
ENOTEMPTY
)
192
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOTSOCK()] =
(Status) -> Errno
Errno
(
Status
ENOTSOCK
)
193
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOTSUP()] =
(Status) -> Errno
Errno
(
Status
ENOTSUP
)
194
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EOVERFLOW()] =
(Status) -> Errno
Errno
(
Status
EOVERFLOW
)
195
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EPERM()] =
(Status) -> Errno
Errno
(
Status
EPERM
)
196
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EPIPE()] =
(Status) -> Errno
Errno
(
Status
EPIPE
)
197
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EPROTO()] =
(Status) -> Errno
Errno
(
Status
EPROTO
)
198
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EPROTONOSUPPORT()] =
(Status) -> Errno
Errno
(
Status
EPROTONOSUPPORT
)
199
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EPROTOTYPE()] =
(Status) -> Errno
Errno
(
Status
EPROTOTYPE
)
200
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ERANGE()] =
(Status) -> Errno
Errno
(
Status
ERANGE
)
201
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EROFS()] =
(Status) -> Errno
Errno
(
Status
EROFS
)
202
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ESHUTDOWN()] =
(Status) -> Errno
Errno
(
Status
ESHUTDOWN
)
203
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ESPIPE()] =
(Status) -> Errno
Errno
(
Status
ESPIPE
)
204
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ESRCH()] =
(Status) -> Errno
Errno
(
Status
ESRCH
)
205
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ETIMEDOUT()] =
(Status) -> Errno
Errno
(
Status
ETIMEDOUT
)
206
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ETXTBSY()] =
(Status) -> Errno
Errno
(
Status
ETXTBSY
)
207
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EXDEV()] =
(Status) -> Errno
Errno
(
Status
EXDEV
)
208
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_UNKNOWN()] =
(Status) -> Errno
Errno
(
Status
UNKNOWN
)
209
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EOF()] =
(Status) -> Errno
Errno
(
Status
EOF
)
210
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENXIO()] =
(Status) -> Errno
Errno
(
Status
ENXIO
)
211
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EMLINK()] =
(Status) -> Errno
Errno
(
Status
EMLINK
)
212
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EHOSTDOWN()] =
(Status) -> Errno
Errno
(
Status
EHOSTDOWN
)
213
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EREMOTEIO()] =
(Status) -> Errno
Errno
(
Status
EREMOTEIO
)
214
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOTTY()] =
(Status) -> Errno
Errno
(
Status
ENOTTY
)
215
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EFTYPE()] =
(Status) -> Errno
Errno
(
Status
EFTYPE
)
216
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EILSEQ()] =
(Status) -> Errno
Errno
(
Status
EILSEQ
)
217
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ESOCKTNOSUPPORT()] =
(Status) -> Errno
Errno
(
Status
ESOCKTNOSUPPORT
)
218
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENODATA()] =
(Status) -> Errno
Errno
(
Status
ENODATA
)
219
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_EUNATCH()] =
(Status) -> Errno
Errno
(
Status
EUNATCH
)
220
Map[Int, Errno]
errno_errors
(Map[Int, Errno], Int, Errno) -> Unit
[
uv_ENOEXEC()] =
(Status) -> Errno
Errno
(
Status
ENOEXEC
)
221 for
Int
value
,
Errno
error
in
Map[Int, Errno]
errno_errors
{
222
Map[Errno, Int]
errno_values
(Map[Errno, Int], Errno, Int) -> Unit
[
error] =
Int
value
223 } 224} 225 226///| 227#deprecated 228pub fn
(errno : Status) -> Errno
errno
(
Status
errno
:
enum Status {
  E2BIG
  EACCES
  EADDRINUSE
  EADDRNOTAVAIL
  EAFNOSUPPORT
  EAGAIN
  EAI_ADDRFAMILY
  EAI_AGAIN
  EAI_BADFLAGS
  EAI_BADHINTS
  EAI_CANCELED
  EAI_FAIL
  EAI_FAMILY
  EAI_MEMORY
  EAI_NODATA
  EAI_NONAME
  EAI_OVERFLOW
  EAI_PROTOCOL
  EAI_SERVICE
  EAI_SOCKTYPE
  EALREADY
  EBADF
  EBUSY
  ECANCELED
  ECHARSET
  ECONNABORTED
  ECONNREFUSED
  ECONNRESET
  EDESTADDRREQ
  EEXIST
  EFAULT
  EFBIG
  EHOSTUNREACH
  EINTR
  EINVAL
  EIO
  EISCONN
  EISDIR
  ELOOP
  EMFILE
  EMSGSIZE
  ENAMETOOLONG
  ENETDOWN
  ENETUNREACH
  ENFILE
  ENOBUFS
  ENODEV
  ENOENT
  ENOMEM
  ENONET
  ENOPROTOOPT
  ENOSPC
  ENOSYS
  ENOTCONN
  ENOTDIR
  ENOTEMPTY
  ENOTSOCK
  ENOTSUP
  EOVERFLOW
  EPERM
  EPIPE
  EPROTO
  EPROTONOSUPPORT
  EPROTOTYPE
  ERANGE
  EROFS
  ESHUTDOWN
  ESPIPE
  ESRCH
  ETIMEDOUT
  ETXTBSY
  EXDEV
  UNKNOWN
  EOF
  ENXIO
  EMLINK
  EHOSTDOWN
  EREMOTEIO
  ENOTTY
  EFTYPE
  EILSEQ
  ESOCKTNOSUPPORT
  ENODATA
  EUNATCH
  ENOEXEC
}
Status
) ->
type! Errno Status
Errno
{
229
(Status) -> Errno
Errno
(
Status
errno
)
230} 231 232///| 233fn
type! Errno Status
Errno
::
(errno : Int) -> Errno
of_int
(
Int
errno
:
Int
Int
) ->
type! Errno Status
Errno
{
234
Map[Int, Errno]
errno_errors
.
(self : Map[Int, Errno], key : Int) -> Errno?

Get the value associated with a key.

get
(
Int
errno
).
(self : Errno?, default : Errno) -> Errno

Return the contained Some value or the provided default.

or
(
(Status) -> Errno
Errno
(
Status
UNKNOWN
))
235} 236 237///| 238fn
type! Errno Status
Errno
::
(self : Errno) -> Int
to_int
(
Errno
self
:
type! Errno Status
Errno
) ->
Int
Int
{
239
Map[Errno, Int]
errno_values
.
(self : Map[Errno, Int], key : Errno) -> Int?

Get the value associated with a key.

get
(
Errno
self
).
(self : Int?, default : Int) -> Int

Return the contained Some value or the provided default.

or
(
() -> Int
uv_UNKNOWN
())
240} 241 242///| 243pub impl
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
for
type! Errno Status
Errno
with
(self : Errno, logger : &Logger) -> Unit
output
(
Errno
self
:
type! Errno Status
Errno
,
&Logger
logger
: &
trait Logger {
  write_string(Self, String) -> Unit
  write_substring(Self, String, Int, Int) -> Unit
  write_char(Self, Char) -> Unit
}

Trait for a logger, where debug logs can be written into

Logger
) ->
Unit
Unit
{
244 if
Map[Errno, @string.StringView]
errno_messages
.
(self : Map[Errno, @string.StringView], key : Errno) -> @string.StringView?

Get the value associated with a key.

get
(
Errno
self
) is
(@string.StringView) -> @string.StringView?
Some
(
@string.StringView
message
) {
245
&Logger
logger
.
(&Logger, String) -> Unit
write_string
(
@string.StringView
message
.
(self : @string.StringView) -> String

Returns a new String containing a copy of the characters in this view.

Examples

  let str = "Hello World"
  let view = str.charcodes(start = str.offset_of_nth_char(0).unwrap(),end   = str.offset_of_nth_char(5).unwrap()) // "Hello"
  inspect(view.to_string(), content="Hello")
to_string
())
246 return 247 } 248 let
@string.StringView
message
=
(errno : Int) -> @string.StringView
strerror
(
Errno
self
.
(self : Errno) -> Int
to_int
())
249
Map[Errno, @string.StringView]
errno_messages
(Map[Errno, @string.StringView], Errno, @string.StringView) -> Unit
[
self] =
@string.StringView
message
250
&Logger
logger
.
(&Logger, String) -> Unit
write_string
(
@string.StringView
message
.
(self : @string.StringView) -> String

Returns a new String containing a copy of the characters in this view.

Examples

  let str = "Hello World"
  let view = str.charcodes(start = str.offset_of_nth_char(0).unwrap(),end   = str.offset_of_nth_char(5).unwrap()) // "Hello"
  inspect(view.to_string(), content="Hello")
to_string
())
251} 252 253///| 254extern "c" fn uv_E2BIG() ->
Int
Int
= "moonbit_uv_E2BIG"
255 256///| 257extern "c" fn uv_EACCES() ->
Int
Int
= "moonbit_uv_EACCES"
258 259///| 260extern "c" fn uv_EADDRINUSE() ->
Int
Int
= "moonbit_uv_EADDRINUSE"
261 262///| 263extern "c" fn uv_EADDRNOTAVAIL() ->
Int
Int
= "moonbit_uv_EADDRNOTAVAIL"
264 265///| 266extern "c" fn uv_EAFNOSUPPORT() ->
Int
Int
= "moonbit_uv_EAFNOSUPPORT"
267 268///| 269extern "c" fn uv_EAGAIN() ->
Int
Int
= "moonbit_uv_EAGAIN"
270 271///| 272extern "c" fn uv_EAI_ADDRFAMILY() ->
Int
Int
= "moonbit_uv_EAI_ADDRFAMILY"
273 274///| 275extern "c" fn uv_EAI_AGAIN() ->
Int
Int
= "moonbit_uv_EAI_AGAIN"
276 277///| 278extern "c" fn uv_EAI_BADFLAGS() ->
Int
Int
= "moonbit_uv_EAI_BADFLAGS"
279 280///| 281extern "c" fn uv_EAI_BADHINTS() ->
Int
Int
= "moonbit_uv_EAI_BADHINTS"
282 283///| 284extern "c" fn uv_EAI_CANCELED() ->
Int
Int
= "moonbit_uv_EAI_CANCELED"
285 286///| 287extern "c" fn uv_EAI_FAIL() ->
Int
Int
= "moonbit_uv_EAI_FAIL"
288 289///| 290extern "c" fn uv_EAI_FAMILY() ->
Int
Int
= "moonbit_uv_EAI_FAMILY"
291 292///| 293extern "c" fn uv_EAI_MEMORY() ->
Int
Int
= "moonbit_uv_EAI_MEMORY"
294 295///| 296extern "c" fn uv_EAI_NODATA() ->
Int
Int
= "moonbit_uv_EAI_NODATA"
297 298///| 299extern "c" fn uv_EAI_NONAME() ->
Int
Int
= "moonbit_uv_EAI_NONAME"
300 301///| 302extern "c" fn uv_EAI_OVERFLOW() ->
Int
Int
= "moonbit_uv_EAI_OVERFLOW"
303 304///| 305extern "c" fn uv_EAI_PROTOCOL() ->
Int
Int
= "moonbit_uv_EAI_PROTOCOL"
306 307///| 308extern "c" fn uv_EAI_SERVICE() ->
Int
Int
= "moonbit_uv_EAI_SERVICE"
309 310///| 311extern "c" fn uv_EAI_SOCKTYPE() ->
Int
Int
= "moonbit_uv_EAI_SOCKTYPE"
312 313///| 314extern "c" fn uv_EALREADY() ->
Int
Int
= "moonbit_uv_EALREADY"
315 316///| 317extern "c" fn uv_EBADF() ->
Int
Int
= "moonbit_uv_EBADF"
318 319///| 320extern "c" fn uv_EBUSY() ->
Int
Int
= "moonbit_uv_EBUSY"
321 322///| 323extern "c" fn uv_ECANCELED() ->
Int
Int
= "moonbit_uv_ECANCELED"
324 325///| 326extern "c" fn uv_ECHARSET() ->
Int
Int
= "moonbit_uv_ECHARSET"
327 328///| 329extern "c" fn uv_ECONNABORTED() ->
Int
Int
= "moonbit_uv_ECONNABORTED"
330 331///| 332extern "c" fn uv_ECONNREFUSED() ->
Int
Int
= "moonbit_uv_ECONNREFUSED"
333 334///| 335extern "c" fn uv_ECONNRESET() ->
Int
Int
= "moonbit_uv_ECONNRESET"
336 337///| 338extern "c" fn uv_EDESTADDRREQ() ->
Int
Int
= "moonbit_uv_EDESTADDRREQ"
339 340///| 341extern "c" fn uv_EEXIST() ->
Int
Int
= "moonbit_uv_EEXIST"
342 343///| 344extern "c" fn uv_EFAULT() ->
Int
Int
= "moonbit_uv_EFAULT"
345 346///| 347extern "c" fn uv_EFBIG() ->
Int
Int
= "moonbit_uv_EFBIG"
348 349///| 350extern "c" fn uv_EHOSTUNREACH() ->
Int
Int
= "moonbit_uv_EHOSTUNREACH"
351 352///| 353extern "c" fn uv_EINTR() ->
Int
Int
= "moonbit_uv_EINTR"
354 355///| 356extern "c" fn uv_EINVAL() ->
Int
Int
= "moonbit_uv_EINVAL"
357 358///| 359extern "c" fn uv_EIO() ->
Int
Int
= "moonbit_uv_EIO"
360 361///| 362extern "c" fn uv_EISCONN() ->
Int
Int
= "moonbit_uv_EISCONN"
363 364///| 365extern "c" fn uv_EISDIR() ->
Int
Int
= "moonbit_uv_EISDIR"
366 367///| 368extern "c" fn uv_ELOOP() ->
Int
Int
= "moonbit_uv_ELOOP"
369 370///| 371extern "c" fn uv_EMFILE() ->
Int
Int
= "moonbit_uv_EMFILE"
372 373///| 374extern "c" fn uv_EMSGSIZE() ->
Int
Int
= "moonbit_uv_EMSGSIZE"
375 376///| 377extern "c" fn uv_ENAMETOOLONG() ->
Int
Int
= "moonbit_uv_ENAMETOOLONG"
378 379///| 380extern "c" fn uv_ENETDOWN() ->
Int
Int
= "moonbit_uv_ENETDOWN"
381 382///| 383extern "c" fn uv_ENETUNREACH() ->
Int
Int
= "moonbit_uv_ENETUNREACH"
384 385///| 386extern "c" fn uv_ENFILE() ->
Int
Int
= "moonbit_uv_ENFILE"
387 388///| 389extern "c" fn uv_ENOBUFS() ->
Int
Int
= "moonbit_uv_ENOBUFS"
390 391///| 392extern "c" fn uv_ENODEV() ->
Int
Int
= "moonbit_uv_ENODEV"
393 394///| 395extern "c" fn uv_ENOENT() ->
Int
Int
= "moonbit_uv_ENOENT"
396 397///| 398extern "c" fn uv_ENOMEM() ->
Int
Int
= "moonbit_uv_ENOMEM"
399 400///| 401extern "c" fn uv_ENONET() ->
Int
Int
= "moonbit_uv_ENONET"
402 403///| 404extern "c" fn uv_ENOPROTOOPT() ->
Int
Int
= "moonbit_uv_ENOPROTOOPT"
405 406///| 407extern "c" fn uv_ENOSPC() ->
Int
Int
= "moonbit_uv_ENOSPC"
408 409///| 410extern "c" fn uv_ENOSYS() ->
Int
Int
= "moonbit_uv_ENOSYS"
411 412///| 413extern "c" fn uv_ENOTCONN() ->
Int
Int
= "moonbit_uv_ENOTCONN"
414 415///| 416extern "c" fn uv_ENOTDIR() ->
Int
Int
= "moonbit_uv_ENOTDIR"
417 418///| 419extern "c" fn uv_ENOTEMPTY() ->
Int
Int
= "moonbit_uv_ENOTEMPTY"
420 421///| 422extern "c" fn uv_ENOTSOCK() ->
Int
Int
= "moonbit_uv_ENOTSOCK"
423 424///| 425extern "c" fn uv_ENOTSUP() ->
Int
Int
= "moonbit_uv_ENOTSUP"
426 427///| 428extern "c" fn uv_EOVERFLOW() ->
Int
Int
= "moonbit_uv_EOVERFLOW"
429 430///| 431extern "c" fn uv_EPERM() ->
Int
Int
= "moonbit_uv_EPERM"
432 433///| 434extern "c" fn uv_EPIPE() ->
Int
Int
= "moonbit_uv_EPIPE"
435 436///| 437extern "c" fn uv_EPROTO() ->
Int
Int
= "moonbit_uv_EPROTO"
438 439///| 440extern "c" fn uv_EPROTONOSUPPORT() ->
Int
Int
= "moonbit_uv_EPROTONOSUPPORT"
441 442///| 443extern "c" fn uv_EPROTOTYPE() ->
Int
Int
= "moonbit_uv_EPROTOTYPE"
444 445///| 446extern "c" fn uv_ERANGE() ->
Int
Int
= "moonbit_uv_ERANGE"
447 448///| 449extern "c" fn uv_EROFS() ->
Int
Int
= "moonbit_uv_EROFS"
450 451///| 452extern "c" fn uv_ESHUTDOWN() ->
Int
Int
= "moonbit_uv_ESHUTDOWN"
453 454///| 455extern "c" fn uv_ESPIPE() ->
Int
Int
= "moonbit_uv_ESPIPE"
456 457///| 458extern "c" fn uv_ESRCH() ->
Int
Int
= "moonbit_uv_ESRCH"
459 460///| 461extern "c" fn uv_ETIMEDOUT() ->
Int
Int
= "moonbit_uv_ETIMEDOUT"
462 463///| 464extern "c" fn uv_ETXTBSY() ->
Int
Int
= "moonbit_uv_ETXTBSY"
465 466///| 467extern "c" fn uv_EXDEV() ->
Int
Int
= "moonbit_uv_EXDEV"
468 469///| 470extern "c" fn uv_UNKNOWN() ->
Int
Int
= "moonbit_uv_UNKNOWN"
471 472///| 473extern "c" fn uv_EOF() ->
Int
Int
= "moonbit_uv_EOF"
474 475///| 476extern "c" fn uv_ENXIO() ->
Int
Int
= "moonbit_uv_ENXIO"
477 478///| 479extern "c" fn uv_EMLINK() ->
Int
Int
= "moonbit_uv_EMLINK"
480 481///| 482extern "c" fn uv_EHOSTDOWN() ->
Int
Int
= "moonbit_uv_EHOSTDOWN"
483 484///| 485extern "c" fn uv_EREMOTEIO() ->
Int
Int
= "moonbit_uv_EREMOTEIO"
486 487///| 488extern "c" fn uv_ENOTTY() ->
Int
Int
= "moonbit_uv_ENOTTY"
489 490///| 491extern "c" fn uv_EFTYPE() ->
Int
Int
= "moonbit_uv_EFTYPE"
492 493///| 494extern "c" fn uv_EILSEQ() ->
Int
Int
= "moonbit_uv_EILSEQ"
495 496///| 497extern "c" fn uv_ESOCKTNOSUPPORT() ->
Int
Int
= "moonbit_uv_ESOCKTNOSUPPORT"
498 499///| 500extern "c" fn uv_ENODATA() ->
Int
Int
= "moonbit_uv_ENODATA"
501 502///| 503extern "c" fn uv_EUNATCH() ->
Int
Int
= "moonbit_uv_EUNATCH"
504 505///| 506extern "c" fn uv_ENOEXEC() ->
Int
Int
= "moonbit_uv_ENOEXEC"
507 508///| 509let
Int
_E2BIG
:
Int
Int
=
() -> Int
uv_E2BIG
()
510 511///| 512let
Int
_EACCES
:
Int
Int
=
() -> Int
uv_EACCES
()
513 514///| 515let
Int
_EADDRINUSE
:
Int
Int
=
() -> Int
uv_EADDRINUSE
()
516 517///| 518let
Int
_EADDRNOTAVAIL
:
Int
Int
=
() -> Int
uv_EADDRNOTAVAIL
()
519 520///| 521let
Int
_EAFNOSUPPORT
:
Int
Int
=
() -> Int
uv_EAFNOSUPPORT
()
522 523///| 524let
Int
_EAGAIN
:
Int
Int
=
() -> Int
uv_EAGAIN
()
525 526///| 527let
Int
_EAI_ADDRFAMILY
:
Int
Int
=
() -> Int
uv_EAI_ADDRFAMILY
()
528 529///| 530let
Int
_EAI_AGAIN
:
Int
Int
=
() -> Int
uv_EAI_AGAIN
()
531 532///| 533let
Int
_EAI_BADFLAGS
:
Int
Int
=
() -> Int
uv_EAI_BADFLAGS
()
534 535///| 536let
Int
_EAI_BADHINTS
:
Int
Int
=
() -> Int
uv_EAI_BADHINTS
()
537 538///| 539let
Int
_EAI_CANCELED
:
Int
Int
=
() -> Int
uv_EAI_CANCELED
()
540 541///| 542let
Int
_EAI_FAIL
:
Int
Int
=
() -> Int
uv_EAI_FAIL
()
543 544///| 545let
Int
_EAI_FAMILY
:
Int
Int
=
() -> Int
uv_EAI_FAMILY
()
546 547///| 548let
Int
_EAI_MEMORY
:
Int
Int
=
() -> Int
uv_EAI_MEMORY
()
549 550///| 551let
Int
_EAI_NODATA
:
Int
Int
=
() -> Int
uv_EAI_NODATA
()
552 553///| 554let
Int
_EAI_NONAME
:
Int
Int
=
() -> Int
uv_EAI_NONAME
()
555 556///| 557let
Int
_EAI_OVERFLOW
:
Int
Int
=
() -> Int
uv_EAI_OVERFLOW
()
558 559///| 560let
Int
_EAI_PROTOCOL
:
Int
Int
=
() -> Int
uv_EAI_PROTOCOL
()
561 562///| 563let
Int
_EAI_SERVICE
:
Int
Int
=
() -> Int
uv_EAI_SERVICE
()
564 565///| 566let
Int
_EAI_SOCKTYPE
:
Int
Int
=
() -> Int
uv_EAI_SOCKTYPE
()
567 568///| 569let
Int
_EALREADY
:
Int
Int
=
() -> Int
uv_EALREADY
()
570 571///| 572let
Int
_EBADF
:
Int
Int
=
() -> Int
uv_EBADF
()
573 574///| 575let
Int
_EBUSY
:
Int
Int
=
() -> Int
uv_EBUSY
()
576 577///| 578let
Int
_ECANCELED
:
Int
Int
=
() -> Int
uv_ECANCELED
()
579 580///| 581let
Int
_ECHARSET
:
Int
Int
=
() -> Int
uv_ECHARSET
()
582 583///| 584let
Int
_ECONNABORTED
:
Int
Int
=
() -> Int
uv_ECONNABORTED
()
585 586///| 587let
Int
_ECONNREFUSED
:
Int
Int
=
() -> Int
uv_ECONNREFUSED
()
588 589///| 590let
Int
_ECONNRESET
:
Int
Int
=
() -> Int
uv_ECONNRESET
()
591 592///| 593let
Int
_EDESTADDRREQ
:
Int
Int
=
() -> Int
uv_EDESTADDRREQ
()
594 595///| 596let
Int
_EEXIST
:
Int
Int
=
() -> Int
uv_EEXIST
()
597 598///| 599let
Int
_EFAULT
:
Int
Int
=
() -> Int
uv_EFAULT
()
600 601///| 602let
Int
_EFBIG
:
Int
Int
=
() -> Int
uv_EFBIG
()
603 604///| 605let
Int
_EHOSTUNREACH
:
Int
Int
=
() -> Int
uv_EHOSTUNREACH
()
606 607///| 608let
Int
_EINTR
:
Int
Int
=
() -> Int
uv_EINTR
()
609 610///| 611let
Int
_EINVAL
:
Int
Int
=
() -> Int
uv_EINVAL
()
612 613///| 614let
Int
_EIO
:
Int
Int
=
() -> Int
uv_EIO
()
615 616///| 617let
Int
_EISCONN
:
Int
Int
=
() -> Int
uv_EISCONN
()
618 619///| 620let
Int
_EISDIR
:
Int
Int
=
() -> Int
uv_EISDIR
()
621 622///| 623let
Int
_ELOOP
:
Int
Int
=
() -> Int
uv_ELOOP
()
624 625///| 626let
Int
_EMFILE
:
Int
Int
=
() -> Int
uv_EMFILE
()
627 628///| 629let
Int
_EMSGSIZE
:
Int
Int
=
() -> Int
uv_EMSGSIZE
()
630 631///| 632let
Int
_ENAMETOOLONG
:
Int
Int
=
() -> Int
uv_ENAMETOOLONG
()
633 634///| 635let
Int
_ENETDOWN
:
Int
Int
=
() -> Int
uv_ENETDOWN
()
636 637///| 638let
Int
_ENETUNREACH
:
Int
Int
=
() -> Int
uv_ENETUNREACH
()
639 640///| 641let
Int
_ENFILE
:
Int
Int
=
() -> Int
uv_ENFILE
()
642 643///| 644let
Int
_ENOBUFS
:
Int
Int
=
() -> Int
uv_ENOBUFS
()
645 646///| 647let
Int
_ENODEV
:
Int
Int
=
() -> Int
uv_ENODEV
()
648 649///| 650let
Int
_ENOENT
:
Int
Int
=
() -> Int
uv_ENOENT
()
651 652///| 653let
Int
_ENOMEM
:
Int
Int
=
() -> Int
uv_ENOMEM
()
654 655///| 656let
Int
_ENONET
:
Int
Int
=
() -> Int
uv_ENONET
()
657 658///| 659let
Int
_ENOPROTOOPT
:
Int
Int
=
() -> Int
uv_ENOPROTOOPT
()
660 661///| 662let
Int
_ENOSPC
:
Int
Int
=
() -> Int
uv_ENOSPC
()
663 664///| 665let
Int
_ENOSYS
:
Int
Int
=
() -> Int
uv_ENOSYS
()
666 667///| 668let
Int
_ENOTCONN
:
Int
Int
=
() -> Int
uv_ENOTCONN
()
669 670///| 671let
Int
_ENOTDIR
:
Int
Int
=
() -> Int
uv_ENOTDIR
()
672 673///| 674let
Int
_ENOTEMPTY
:
Int
Int
=
() -> Int
uv_ENOTEMPTY
()
675 676///| 677let
Int
_ENOTSOCK
:
Int
Int
=
() -> Int
uv_ENOTSOCK
()
678 679///| 680let
Int
_ENOTSUP
:
Int
Int
=
() -> Int
uv_ENOTSUP
()
681 682///| 683let
Int
_EOVERFLOW
:
Int
Int
=
() -> Int
uv_EOVERFLOW
()
684 685///| 686let
Int
_EPERM
:
Int
Int
=
() -> Int
uv_EPERM
()
687 688///| 689let
Int
_EPIPE
:
Int
Int
=
() -> Int
uv_EPIPE
()
690 691///| 692let
Int
_EPROTO
:
Int
Int
=
() -> Int
uv_EPROTO
()
693 694///| 695let
Int
_EPROTONOSUPPORT
:
Int
Int
=
() -> Int
uv_EPROTONOSUPPORT
()
696 697///| 698let
Int
_EPROTOTYPE
:
Int
Int
=
() -> Int
uv_EPROTOTYPE
()
699 700///| 701let
Int
_ERANGE
:
Int
Int
=
() -> Int
uv_ERANGE
()
702 703///| 704let
Int
_EROFS
:
Int
Int
=
() -> Int
uv_EROFS
()
705 706///| 707let
Int
_ESHUTDOWN
:
Int
Int
=
() -> Int
uv_ESHUTDOWN
()
708 709///| 710let
Int
_ESPIPE
:
Int
Int
=
() -> Int
uv_ESPIPE
()
711 712///| 713let
Int
_ESRCH
:
Int
Int
=
() -> Int
uv_ESRCH
()
714 715///| 716let
Int
_ETIMEDOUT
:
Int
Int
=
() -> Int
uv_ETIMEDOUT
()
717 718///| 719let
Int
_ETXTBSY
:
Int
Int
=
() -> Int
uv_ETXTBSY
()
720 721///| 722let
Int
_EXDEV
:
Int
Int
=
() -> Int
uv_EXDEV
()
723 724///| 725let
Int
_UNKNOWN
:
Int
Int
=
() -> Int
uv_UNKNOWN
()
726 727///| 728let
Int
_EOF
:
Int
Int
=
() -> Int
uv_EOF
()
729 730///| 731let
Int
_ENXIO
:
Int
Int
=
() -> Int
uv_ENXIO
()
732 733///| 734let
Int
_EMLINK
:
Int
Int
=
() -> Int
uv_EMLINK
()
735 736///| 737let
Int
_EHOSTDOWN
:
Int
Int
=
() -> Int
uv_EHOSTDOWN
()
738 739///| 740let
Int
_EREMOTEIO
:
Int
Int
=
() -> Int
uv_EREMOTEIO
()
741 742///| 743let
Int
_ENOTTY
:
Int
Int
=
() -> Int
uv_ENOTTY
()
744 745///| 746let
Int
_EFTYPE
:
Int
Int
=
() -> Int
uv_EFTYPE
()
747 748///| 749let
Int
_EILSEQ
:
Int
Int
=
() -> Int
uv_EILSEQ
()
750 751///| 752let
Int
_ESOCKTNOSUPPORT
:
Int
Int
=
() -> Int
uv_ESOCKTNOSUPPORT
()
753 754///| 755let
Int
_ENODATA
:
Int
Int
=
() -> Int
uv_ENODATA
()
756 757///| 758let
Int
_EUNATCH
:
Int
Int
=
() -> Int
uv_EUNATCH
()
759 760///| 761let
Int
_ENOEXEC
:
Int
Int
=
() -> Int
uv_ENOEXEC
()
762