1///|
2pub(all) type Size 
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
3 4///| Non-negative file size or length of a region within a file. 5pub(all) type FileSize
UInt64
UInt64
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
6 7///| Timestamp in nanoseconds. 8pub(all) type TimeStamp
UInt64
UInt64
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
9 10///| Identifiers for clocks. 11/// 12/// - Realtime: The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z. 13/// - Monotonic: The store-wide monotonic clock, which is defined as a clock measuring 14/// real time, whose value cannot be adjusted and which cannot have negative 15/// clock jumps. The epoch of this clock is undefined. The absolute time 16/// value of this clock therefore has no meaning. 17/// - ProcessCPUTimeId: The CPU-time clock associated with the current process. 18/// - ThreadCPUTimeId: The CPU-time clock associated with the current thread. 19pub(all) enum ClockId { 20
ClockId
RealTime
21
ClockId
Monotonic
22
ClockId
ProcessCPUTimeId
23
ClockId
ThreadCPUTimeId
24} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
25 26///| 27pub fn
enum ClockId {
  RealTime
  Monotonic
  ProcessCPUTimeId
  ThreadCPUTimeId
}

Identifiers for clocks.

  • Realtime: The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z.
  • Monotonic: The store-wide monotonic clock, which is defined as a clock measuring real time, whose value cannot be adjusted and which cannot have negative clock jumps. The epoch of this clock is undefined. The absolute time value of this clock therefore has no meaning.
  • ProcessCPUTimeId: The CPU-time clock associated with the current process.
  • ThreadCPUTimeId: The CPU-time clock associated with the current thread.
ClockId
::
(self : ClockId) -> UInt
value
(
ClockId
self
:
enum ClockId {
  RealTime
  Monotonic
  ProcessCPUTimeId
  ThreadCPUTimeId
}

Identifiers for clocks.

  • Realtime: The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z.
  • Monotonic: The store-wide monotonic clock, which is defined as a clock measuring real time, whose value cannot be adjusted and which cannot have negative clock jumps. The epoch of this clock is undefined. The absolute time value of this clock therefore has no meaning.
  • ProcessCPUTimeId: The CPU-time clock associated with the current process.
  • ThreadCPUTimeId: The CPU-time clock associated with the current thread.
ClockId
) ->
UInt
UInt
{
28 match
ClockId
self
{
29
ClockId
RealTime
=> 0
30
ClockId
Monotonic
=> 1
31
ClockId
ProcessCPUTimeId
=> 2
32
ClockId
ThreadCPUTimeId
=> 3
33 } 34} 35 36///| 37pub fn
enum ClockId {
  RealTime
  Monotonic
  ProcessCPUTimeId
  ThreadCPUTimeId
}

Identifiers for clocks.

  • Realtime: The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z.
  • Monotonic: The store-wide monotonic clock, which is defined as a clock measuring real time, whose value cannot be adjusted and which cannot have negative clock jumps. The epoch of this clock is undefined. The absolute time value of this clock therefore has no meaning.
  • ProcessCPUTimeId: The CPU-time clock associated with the current process.
  • ThreadCPUTimeId: The CPU-time clock associated with the current thread.
ClockId
::
(value : UInt) -> ClockId?
from_value
(
UInt
value
:
UInt
UInt
) ->
enum ClockId {
  RealTime
  Monotonic
  ProcessCPUTimeId
  ThreadCPUTimeId
}

Identifiers for clocks.

  • Realtime: The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z.
  • Monotonic: The store-wide monotonic clock, which is defined as a clock measuring real time, whose value cannot be adjusted and which cannot have negative clock jumps. The epoch of this clock is undefined. The absolute time value of this clock therefore has no meaning.
  • ProcessCPUTimeId: The CPU-time clock associated with the current process.
  • ThreadCPUTimeId: The CPU-time clock associated with the current thread.
ClockId
? {
38 match
UInt
value
{
39 0 =>
(ClockId) -> ClockId?
Some
(
ClockId
RealTime
)
40 1 =>
(ClockId) -> ClockId?
Some
(
ClockId
Monotonic
)
41 2 =>
(ClockId) -> ClockId?
Some
(
ClockId
ProcessCPUTimeId
)
42 3 =>
(ClockId) -> ClockId?
Some
(
ClockId
ThreadCPUTimeId
)
43 _ =>
ClockId?
None
44 } 45} 46 47///| Error codes returned by functions. 48/// Not all of these error codes are returned by the functions provided by this 49/// API; some are used in higher-level library layers, and others are provided 50/// merely for alignment with POSIX. 51/// 52/// See : https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#-errno-variant 53pub(all) suberror Errno { 54
Errno
Success
55
Errno
TooBig
56
Errno
Acces
57
Errno
Addrinuse
58
Errno
Addrnotavail
59
Errno
Afnosupport
60
Errno
Again
61
Errno
Already
62
Errno
Badf
63
Errno
Badmsg
64
Errno
Busy
65
Errno
Canceled
66
Errno
Child
67
Errno
Connaborted
68
Errno
Connrefused
69
Errno
Connreset
70
Errno
Deadlock
71
Errno
Destaddrreq
72
Errno
Dom
73
Errno
Dquot
74
Errno
Exist
75
Errno
Fault
76
Errno
Fbig
77
Errno
Hostunreach
78
Errno
Idrm
79
Errno
Ilseq
80
Errno
Inprogress
81
Errno
Intr
82
Errno
Inval
83
Errno
IO
84
Errno
Isconn
85
Errno
Isdir
86
Errno
Loop
87
Errno
Mfile
88
Errno
Mlink
89
Errno
Msgsize
90
Errno
Multihop
91
Errno
Nametoolong
92
Errno
Netdown
93
Errno
Netreset
94
Errno
Netunreach
95
Errno
Nfile
96
Errno
Nobufs
97
Errno
Nodev
98
Errno
Noent
99
Errno
Noexec
100
Errno
Nolck
101
Errno
Nolink
102
Errno
Nomem
103
Errno
Nomsg
104
Errno
Noprotoopt
105
Errno
Nospc
106
Errno
Nosys
107
Errno
Notconn
108
Errno
Notdir
109
Errno
Notempty
110
Errno
Notrecoverable
111
Errno
Notsock
112
Errno
Notsup
113
Errno
Notty
114
Errno
Nxio
115
Errno
Overflow
116
Errno
Ownerdead
117
Errno
Perm
118
Errno
Pipe
119
Errno
Proto
120
Errno
Protonosupport
121
Errno
Prototype
122
Errno
Range
123
Errno
Rofs
124
Errno
Spipe
125
Errno
Srch
126
Errno
Stale
127
Errno
Timedout
128
Errno
Txtbsy
129
Errno
Xdev
130
Errno
Notcapable
131} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
132 133///| 134pub fn
(self : Errno) -> UInt
value
(
Errno
self
:
type! Errno {
  Success
  TooBig
  Acces
  Addrinuse
  Addrnotavail
  Afnosupport
  Again
  Already
  Badf
  Badmsg
  Busy
  Canceled
  Child
  Connaborted
  Connrefused
  Connreset
  Deadlock
  Destaddrreq
  Dom
  Dquot
  Exist
  Fault
  Fbig
  Hostunreach
  Idrm
  Ilseq
  Inprogress
  Intr
  Inval
  IO
  Isconn
  Isdir
  Loop
  Mfile
  Mlink
  Msgsize
  Multihop
  Nametoolong
  Netdown
  Netreset
  Netunreach
  Nfile
  Nobufs
  Nodev
  Noent
  Noexec
  Nolck
  Nolink
  Nomem
  Nomsg
  Noprotoopt
  Nospc
  Nosys
  Notconn
  Notdir
  Notempty
  Notrecoverable
  Notsock
  Notsup
  Notty
  Nxio
  Overflow
  Ownerdead
  Perm
  Pipe
  Proto
  Protonosupport
  Prototype
  Range
  Rofs
  Spipe
  Srch
  Stale
  Timedout
  Txtbsy
  Xdev
  Notcapable
}

Error codes returned by functions. Not all of these error codes are returned by the functions provided by this API; some are used in higher-level library layers, and others are provided merely for alignment with POSIX.

See : https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#-errno-variant

Errno
) ->
UInt
UInt
{
135 match
Errno
self
{
136
Errno
Success
=> 0
137
Errno
TooBig
=> 1
138
Errno
Acces
=> 2
139
Errno
Addrinuse
=> 3
140
Errno
Addrnotavail
=> 4
141
Errno
Afnosupport
=> 5
142
Errno
Again
=> 6
143
Errno
Already
=> 7
144
Errno
Badf
=> 8
145
Errno
Badmsg
=> 9
146
Errno
Busy
=> 10
147
Errno
Canceled
=> 11
148
Errno
Child
=> 12
149
Errno
Connaborted
=> 13
150
Errno
Connrefused
=> 14
151
Errno
Connreset
=> 15
152
Errno
Deadlock
=> 16
153
Errno
Destaddrreq
=> 17
154
Errno
Dom
=> 18
155
Errno
Dquot
=> 19
156
Errno
Exist
=> 20
157
Errno
Fault
=> 21
158
Errno
Fbig
=> 22
159
Errno
Hostunreach
=> 23
160
Errno
Idrm
=> 24
161
Errno
Ilseq
=> 25
162
Errno
Inprogress
=> 26
163
Errno
Intr
=> 27
164
Errno
Inval
=> 28
165
Errno
IO
=> 29
166
Errno
Isconn
=> 30
167
Errno
Isdir
=> 31
168
Errno
Loop
=> 32
169
Errno
Mfile
=> 33
170
Errno
Mlink
=> 34
171
Errno
Msgsize
=> 35
172
Errno
Multihop
=> 36
173
Errno
Nametoolong
=> 37
174
Errno
Netdown
=> 38
175
Errno
Netreset
=> 39
176
Errno
Netunreach
=> 40
177
Errno
Nfile
=> 41
178
Errno
Nobufs
=> 42
179
Errno
Nodev
=> 43
180
Errno
Noent
=> 44
181
Errno
Noexec
=> 45
182
Errno
Nolck
=> 46
183
Errno
Nolink
=> 47
184
Errno
Nomem
=> 48
185
Errno
Nomsg
=> 49
186
Errno
Noprotoopt
=> 50
187
Errno
Nospc
=> 51
188
Errno
Nosys
=> 52
189
Errno
Notconn
=> 53
190
Errno
Notdir
=> 54
191
Errno
Notempty
=> 55
192
Errno
Notrecoverable
=> 56
193
Errno
Notsock
=> 57
194
Errno
Notsup
=> 58
195
Errno
Notty
=> 59
196
Errno
Nxio
=> 60
197
Errno
Overflow
=> 61
198
Errno
Ownerdead
=> 62
199
Errno
Perm
=> 63
200
Errno
Pipe
=> 64
201
Errno
Proto
=> 65
202
Errno
Protonosupport
=> 66
203
Errno
Prototype
=> 67
204
Errno
Range
=> 68
205
Errno
Rofs
=> 69
206
Errno
Spipe
=> 70
207
Errno
Srch
=> 71
208
Errno
Stale
=> 72
209
Errno
Timedout
=> 73
210
Errno
Txtbsy
=> 74
211
Errno
Xdev
=> 75
212
Errno
Notcapable
=> 76
213 } 214} 215 216///| 217pub fn
type! Errno {
  Success
  TooBig
  Acces
  Addrinuse
  Addrnotavail
  Afnosupport
  Again
  Already
  Badf
  Badmsg
  Busy
  Canceled
  Child
  Connaborted
  Connrefused
  Connreset
  Deadlock
  Destaddrreq
  Dom
  Dquot
  Exist
  Fault
  Fbig
  Hostunreach
  Idrm
  Ilseq
  Inprogress
  Intr
  Inval
  IO
  Isconn
  Isdir
  Loop
  Mfile
  Mlink
  Msgsize
  Multihop
  Nametoolong
  Netdown
  Netreset
  Netunreach
  Nfile
  Nobufs
  Nodev
  Noent
  Noexec
  Nolck
  Nolink
  Nomem
  Nomsg
  Noprotoopt
  Nospc
  Nosys
  Notconn
  Notdir
  Notempty
  Notrecoverable
  Notsock
  Notsup
  Notty
  Nxio
  Overflow
  Ownerdead
  Perm
  Pipe
  Proto
  Protonosupport
  Prototype
  Range
  Rofs
  Spipe
  Srch
  Stale
  Timedout
  Txtbsy
  Xdev
  Notcapable
}

Error codes returned by functions. Not all of these error codes are returned by the functions provided by this API; some are used in higher-level library layers, and others are provided merely for alignment with POSIX.

See : https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#-errno-variant

Errno
::
(value : UInt) -> Errno?
from_value
(
UInt
value
:
UInt
UInt
) ->
type! Errno {
  Success
  TooBig
  Acces
  Addrinuse
  Addrnotavail
  Afnosupport
  Again
  Already
  Badf
  Badmsg
  Busy
  Canceled
  Child
  Connaborted
  Connrefused
  Connreset
  Deadlock
  Destaddrreq
  Dom
  Dquot
  Exist
  Fault
  Fbig
  Hostunreach
  Idrm
  Ilseq
  Inprogress
  Intr
  Inval
  IO
  Isconn
  Isdir
  Loop
  Mfile
  Mlink
  Msgsize
  Multihop
  Nametoolong
  Netdown
  Netreset
  Netunreach
  Nfile
  Nobufs
  Nodev
  Noent
  Noexec
  Nolck
  Nolink
  Nomem
  Nomsg
  Noprotoopt
  Nospc
  Nosys
  Notconn
  Notdir
  Notempty
  Notrecoverable
  Notsock
  Notsup
  Notty
  Nxio
  Overflow
  Ownerdead
  Perm
  Pipe
  Proto
  Protonosupport
  Prototype
  Range
  Rofs
  Spipe
  Srch
  Stale
  Timedout
  Txtbsy
  Xdev
  Notcapable
}

Error codes returned by functions. Not all of these error codes are returned by the functions provided by this API; some are used in higher-level library layers, and others are provided merely for alignment with POSIX.

See : https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#-errno-variant

Errno
? {
218 match
UInt
value
{
219 0 =>
(Errno) -> Errno?
Some
(
Errno
Success
)
220 1 =>
(Errno) -> Errno?
Some
(
Errno
TooBig
)
221 2 =>
(Errno) -> Errno?
Some
(
Errno
Acces
)
222 3 =>
(Errno) -> Errno?
Some
(
Errno
Addrinuse
)
223 4 =>
(Errno) -> Errno?
Some
(
Errno
Addrnotavail
)
224 5 =>
(Errno) -> Errno?
Some
(
Errno
Afnosupport
)
225 6 =>
(Errno) -> Errno?
Some
(
Errno
Again
)
226 7 =>
(Errno) -> Errno?
Some
(
Errno
Already
)
227 8 =>
(Errno) -> Errno?
Some
(
Errno
Badf
)
228 9 =>
(Errno) -> Errno?
Some
(
Errno
Badmsg
)
229 10 =>
(Errno) -> Errno?
Some
(
Errno
Busy
)
230 11 =>
(Errno) -> Errno?
Some
(
Errno
Canceled
)
231 12 =>
(Errno) -> Errno?
Some
(
Errno
Child
)
232 13 =>
(Errno) -> Errno?
Some
(
Errno
Connaborted
)
233 14 =>
(Errno) -> Errno?
Some
(
Errno
Connrefused
)
234 15 =>
(Errno) -> Errno?
Some
(
Errno
Connreset
)
235 16 =>
(Errno) -> Errno?
Some
(
Errno
Deadlock
)
236 17 =>
(Errno) -> Errno?
Some
(
Errno
Destaddrreq
)
237 18 =>
(Errno) -> Errno?
Some
(
Errno
Dom
)
238 19 =>
(Errno) -> Errno?
Some
(
Errno
Dquot
)
239 20 =>
(Errno) -> Errno?
Some
(
Errno
Exist
)
240 21 =>
(Errno) -> Errno?
Some
(
Errno
Fault
)
241 22 =>
(Errno) -> Errno?
Some
(
Errno
Fbig
)
242 23 =>
(Errno) -> Errno?
Some
(
Errno
Hostunreach
)
243 24 =>
(Errno) -> Errno?
Some
(
Errno
Idrm
)
244 25 =>
(Errno) -> Errno?
Some
(
Errno
Ilseq
)
245 26 =>
(Errno) -> Errno?
Some
(
Errno
Inprogress
)
246 27 =>
(Errno) -> Errno?
Some
(
Errno
Intr
)
247 28 =>
(Errno) -> Errno?
Some
(
Errno
Inval
)
248 29 =>
(Errno) -> Errno?
Some
(
Errno
IO
)
249 30 =>
(Errno) -> Errno?
Some
(
Errno
Isconn
)
250 31 =>
(Errno) -> Errno?
Some
(
Errno
Isdir
)
251 32 =>
(Errno) -> Errno?
Some
(
Errno
Loop
)
252 33 =>
(Errno) -> Errno?
Some
(
Errno
Mfile
)
253 34 =>
(Errno) -> Errno?
Some
(
Errno
Mlink
)
254 35 =>
(Errno) -> Errno?
Some
(
Errno
Msgsize
)
255 36 =>
(Errno) -> Errno?
Some
(
Errno
Multihop
)
256 37 =>
(Errno) -> Errno?
Some
(
Errno
Nametoolong
)
257 38 =>
(Errno) -> Errno?
Some
(
Errno
Netdown
)
258 39 =>
(Errno) -> Errno?
Some
(
Errno
Netreset
)
259 40 =>
(Errno) -> Errno?
Some
(
Errno
Netunreach
)
260 41 =>
(Errno) -> Errno?
Some
(
Errno
Nfile
)
261 42 =>
(Errno) -> Errno?
Some
(
Errno
Nobufs
)
262 43 =>
(Errno) -> Errno?
Some
(
Errno
Nodev
)
263 44 =>
(Errno) -> Errno?
Some
(
Errno
Noent
)
264 45 =>
(Errno) -> Errno?
Some
(
Errno
Noexec
)
265 46 =>
(Errno) -> Errno?
Some
(
Errno
Nolck
)
266 47 =>
(Errno) -> Errno?
Some
(
Errno
Nolink
)
267 48 =>
(Errno) -> Errno?
Some
(
Errno
Nomem
)
268 49 =>
(Errno) -> Errno?
Some
(
Errno
Nomsg
)
269 50 =>
(Errno) -> Errno?
Some
(
Errno
Noprotoopt
)
270 51 =>
(Errno) -> Errno?
Some
(
Errno
Nospc
)
271 52 =>
(Errno) -> Errno?
Some
(
Errno
Nosys
)
272 53 =>
(Errno) -> Errno?
Some
(
Errno
Notconn
)
273 54 =>
(Errno) -> Errno?
Some
(
Errno
Notdir
)
274 55 =>
(Errno) -> Errno?
Some
(
Errno
Notempty
)
275 56 =>
(Errno) -> Errno?
Some
(
Errno
Notrecoverable
)
276 57 =>
(Errno) -> Errno?
Some
(
Errno
Notsock
)
277 58 =>
(Errno) -> Errno?
Some
(
Errno
Notsup
)
278 59 =>
(Errno) -> Errno?
Some
(
Errno
Notty
)
279 60 =>
(Errno) -> Errno?
Some
(
Errno
Nxio
)
280 61 =>
(Errno) -> Errno?
Some
(
Errno
Overflow
)
281 62 =>
(Errno) -> Errno?
Some
(
Errno
Ownerdead
)
282 63 =>
(Errno) -> Errno?
Some
(
Errno
Perm
)
283 64 =>
(Errno) -> Errno?
Some
(
Errno
Pipe
)
284 65 =>
(Errno) -> Errno?
Some
(
Errno
Proto
)
285 66 =>
(Errno) -> Errno?
Some
(
Errno
Protonosupport
)
286 67 =>
(Errno) -> Errno?
Some
(
Errno
Prototype
)
287 68 =>
(Errno) -> Errno?
Some
(
Errno
Range
)
288 69 =>
(Errno) -> Errno?
Some
(
Errno
Rofs
)
289 70 =>
(Errno) -> Errno?
Some
(
Errno
Spipe
)
290 71 =>
(Errno) -> Errno?
Some
(
Errno
Srch
)
291 72 =>
(Errno) -> Errno?
Some
(
Errno
Stale
)
292 73 =>
(Errno) -> Errno?
Some
(
Errno
Timedout
)
293 74 =>
(Errno) -> Errno?
Some
(
Errno
Txtbsy
)
294 75 =>
(Errno) -> Errno?
Some
(
Errno
Xdev
)
295 76 =>
(Errno) -> Errno?
Some
(
Errno
Notcapable
)
296 _ =>
Errno?
None
297 } 298} 299 300///| 301test "errno" { 302 for
UInt
i
in
UInt
0U
..<76 {
303 let
Errno?
errno
=
type! Errno {
  Success
  TooBig
  Acces
  Addrinuse
  Addrnotavail
  Afnosupport
  Again
  Already
  Badf
  Badmsg
  Busy
  Canceled
  Child
  Connaborted
  Connrefused
  Connreset
  Deadlock
  Destaddrreq
  Dom
  Dquot
  Exist
  Fault
  Fbig
  Hostunreach
  Idrm
  Ilseq
  Inprogress
  Intr
  Inval
  IO
  Isconn
  Isdir
  Loop
  Mfile
  Mlink
  Msgsize
  Multihop
  Nametoolong
  Netdown
  Netreset
  Netunreach
  Nfile
  Nobufs
  Nodev
  Noent
  Noexec
  Nolck
  Nolink
  Nomem
  Nomsg
  Noprotoopt
  Nospc
  Nosys
  Notconn
  Notdir
  Notempty
  Notrecoverable
  Notsock
  Notsup
  Notty
  Nxio
  Overflow
  Ownerdead
  Perm
  Pipe
  Proto
  Protonosupport
  Prototype
  Range
  Rofs
  Spipe
  Srch
  Stale
  Timedout
  Txtbsy
  Xdev
  Notcapable
}

Error codes returned by functions. Not all of these error codes are returned by the functions provided by this API; some are used in higher-level library layers, and others are provided merely for alignment with POSIX.

See : https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#-errno-variant

Errno
::
(value : UInt) -> Errno?
from_value
(
UInt
i
)
304
(a : UInt, b : UInt, loc~ : SourceLoc = _) -> Unit raise Error

Asserts that two values are equal. If they are not equal, raises a failure with a message containing the source location and the values being compared.

Parameters:

  • a : First value to compare.
  • b : Second value to compare.
  • loc : Source location information to include in failure messages. This is usually automatically provided by the compiler.

Throws a Failure error if the values are not equal, with a message showing the location of the failing assertion and the actual values that were compared.

Example:

  assert_eq(1, 1)
  assert_eq("hello", "hello")
assert_eq
(
Errno?
errno
.
(self : Errno?) -> Errno

Extract the value in Some.

If the value is None, it throws a panic.

unwrap
().
(self : Errno) -> UInt
value
(),
UInt
i
)
305 } 306} 307 308///| File descriptor rights, determining which actions may be performed. 309pub(all) type Rights
UInt64
UInt64
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
310 311///| 312pub fn
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
::
() -> Rights
new
() ->
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
{
313 0 314} 315 316///| File descriptor rights, determining which actions may be performed. 317pub(all) enum Right { 318
Right
Fd_datasync
319
Right
Fd_read
320
Right
Fd_seek
321
Right
Fd_fdstat_set_flags
322
Right
Fd_sync
323
Right
Fd_tell
324
Right
Fd_write
325
Right
Fd_advice
326
Right
Fd_allocate
327
Right
Path_create_directory
328
Right
Path_create_file
329
Right
Path_link_source
330
Right
Path_link_target
331
Right
Path_open
332
Right
Fd_readdir
333
Right
Path_readlink
334
Right
Path_rename_source
335
Right
Path_rename_target
336
Right
Path_filestat_get
337
Right
Path_filestat_set_size
338
Right
Path_filestat_set_times
339
Right
Fd_filestat_get
340
Right
Fd_filestat_set_size
341
Right
Fd_filestat_set_times
342
Right
Path_symlink
343
Right
Path_remove_directory
344
Right
Path_unlink_file
345
Right
Poll_fd_readwrite
346
Right
Sock_shutdown
347
Right
Sock_accept
348} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
349 350///| 351pub fn
enum Right {
  Fd_datasync
  Fd_read
  Fd_seek
  Fd_fdstat_set_flags
  Fd_sync
  Fd_tell
  Fd_write
  Fd_advice
  Fd_allocate
  Path_create_directory
  Path_create_file
  Path_link_source
  Path_link_target
  Path_open
  Fd_readdir
  Path_readlink
  Path_rename_source
  Path_rename_target
  Path_filestat_get
  Path_filestat_set_size
  Path_filestat_set_times
  Fd_filestat_get
  Fd_filestat_set_size
  Fd_filestat_set_times
  Path_symlink
  Path_remove_directory
  Path_unlink_file
  Poll_fd_readwrite
  Sock_shutdown
  Sock_accept
}

File descriptor rights, determining which actions may be performed.

Right
::
(self : Right) -> UInt64
value
(
Right
self
:
enum Right {
  Fd_datasync
  Fd_read
  Fd_seek
  Fd_fdstat_set_flags
  Fd_sync
  Fd_tell
  Fd_write
  Fd_advice
  Fd_allocate
  Path_create_directory
  Path_create_file
  Path_link_source
  Path_link_target
  Path_open
  Fd_readdir
  Path_readlink
  Path_rename_source
  Path_rename_target
  Path_filestat_get
  Path_filestat_set_size
  Path_filestat_set_times
  Fd_filestat_get
  Fd_filestat_set_size
  Fd_filestat_set_times
  Path_symlink
  Path_remove_directory
  Path_unlink_file
  Poll_fd_readwrite
  Sock_shutdown
  Sock_accept
}

File descriptor rights, determining which actions may be performed.

Right
) ->
UInt64
UInt64
{
352 match
Right
self
{
353
Right
Fd_datasync
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
0
354
Right
Fd_read
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
1
355
Right
Fd_seek
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
2
356
Right
Fd_fdstat_set_flags
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
3
357
Right
Fd_sync
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
4
358
Right
Fd_tell
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
5
359
Right
Fd_write
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
6
360
Right
Fd_advice
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
7
361
Right
Fd_allocate
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
8
362
Right
Path_create_directory
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
9
363
Right
Path_create_file
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
10
364
Right
Path_link_source
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
11
365
Right
Path_link_target
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
12
366
Right
Path_open
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
13
367
Right
Fd_readdir
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
14
368
Right
Path_readlink
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
15
369
Right
Path_rename_source
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
16
370
Right
Path_rename_target
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
17
371
Right
Path_filestat_get
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
18
372
Right
Path_filestat_set_size
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
19
373
Right
Path_filestat_set_times
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
20
374
Right
Fd_filestat_get
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
21
375
Right
Fd_filestat_set_size
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
22
376
Right
Fd_filestat_set_times
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
23
377
Right
Path_symlink
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
24
378
Right
Path_remove_directory
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
25
379
Right
Path_unlink_file
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
26
380
Right
Poll_fd_readwrite
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
27
381
Right
Sock_shutdown
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
28
382
Right
Sock_accept
=> 1UL
(self : UInt64, shift : Int) -> UInt64

Performs a bitwise left shift operation on an unsigned 64-bit integer.

Parameters:

  • self : The unsigned 64-bit integer to be shifted.
  • shift : The number of positions to shift the bits to the left. Must be between 0 and 63 inclusive, values outside this range will be masked with & 63.

Returns the result of shifting self left by shift positions. For each position shifted, the rightmost bit is filled with 0, and the leftmost bit is discarded.

Example:

  let x = 1UL
  inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
  inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
<<
29
383 } 384} 385 386///| 387pub fn
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
::
(self : Rights, right : Right) -> Rights
set
(
Rights
self
:
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
,
Right
right
:
enum Right {
  Fd_datasync
  Fd_read
  Fd_seek
  Fd_fdstat_set_flags
  Fd_sync
  Fd_tell
  Fd_write
  Fd_advice
  Fd_allocate
  Path_create_directory
  Path_create_file
  Path_link_source
  Path_link_target
  Path_open
  Fd_readdir
  Path_readlink
  Path_rename_source
  Path_rename_target
  Path_filestat_get
  Path_filestat_set_size
  Path_filestat_set_times
  Fd_filestat_get
  Fd_filestat_set_size
  Fd_filestat_set_times
  Path_symlink
  Path_remove_directory
  Path_unlink_file
  Poll_fd_readwrite
  Sock_shutdown
  Sock_accept
}

File descriptor rights, determining which actions may be performed.

Right
) ->
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
{
388
Rights
self
.
(self : Rights) -> UInt64

Convert newtype to its underlying type, automatically derived.

inner
()
(self : UInt64, other : UInt64) -> UInt64

Performs a bitwise OR operation between two unsigned 64-bit integers.

Parameters:

  • self : The first unsigned 64-bit integer operand.
  • other : The second unsigned 64-bit integer operand.

Returns a new UInt64 value with bits set to 1 where either or both operands have bits set to 1, and 0 where both operands have bits set to 0.

Example:

  let a = 0xF0F0F0F0UL
  let b = 0x0F0F0F0FUL
  inspect(a | b, content="4294967295") // All bits set to 1
|
Right
right
.
(self : Right) -> UInt64
value
()
389} 390 391///| 392pub fn
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
::
(self : Rights, right : Right) -> Rights
unset
(
Rights
self
:
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
,
Right
right
:
enum Right {
  Fd_datasync
  Fd_read
  Fd_seek
  Fd_fdstat_set_flags
  Fd_sync
  Fd_tell
  Fd_write
  Fd_advice
  Fd_allocate
  Path_create_directory
  Path_create_file
  Path_link_source
  Path_link_target
  Path_open
  Fd_readdir
  Path_readlink
  Path_rename_source
  Path_rename_target
  Path_filestat_get
  Path_filestat_set_size
  Path_filestat_set_times
  Fd_filestat_get
  Fd_filestat_set_size
  Fd_filestat_set_times
  Path_symlink
  Path_remove_directory
  Path_unlink_file
  Poll_fd_readwrite
  Sock_shutdown
  Sock_accept
}

File descriptor rights, determining which actions may be performed.

Right
) ->
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
{
393
Rights
self
.
(self : Rights) -> UInt64

Convert newtype to its underlying type, automatically derived.

inner
()
(self : UInt64, other : UInt64) -> UInt64

Performs a bitwise AND operation between two unsigned 64-bit integers.

Parameters:

  • self : The first unsigned 64-bit integer operand.
  • other : The second unsigned 64-bit integer operand.

Returns the result of performing a bitwise AND operation on the two operands.

Example:

  let a = 0xF0F0F0F0F0F0F0F0UL
  let b = 0xFF00FF00FF00FF00UL
  inspect(a & b, content="17294086455919964160") // 0xF000F000F000F000
&
(
Right
right
.
(self : Right) -> UInt64
value
()
(self : UInt64, other : UInt64) -> UInt64

Performs a bitwise XOR operation between two unsigned 64-bit integers. For each bit position, the result is 1 if the bits at that position in the two operands are different, and 0 if they are the same.

Parameters:

  • self : The first unsigned 64-bit integer operand.
  • other : The second unsigned 64-bit integer operand.

Returns a new UInt64 value representing the bitwise XOR of the two operands.

Example:

  let a = 0xF0F0F0F0UL
  let b = 0x0F0F0F0FUL
  inspect(a ^ b, content="4294967295") // 0xFFFFFFFF
^
0)
394} 395 396///| 397pub fn
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
::
(self : Rights, right : Right) -> Bool
is_set
(
Rights
self
:
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
,
Right
right
:
enum Right {
  Fd_datasync
  Fd_read
  Fd_seek
  Fd_fdstat_set_flags
  Fd_sync
  Fd_tell
  Fd_write
  Fd_advice
  Fd_allocate
  Path_create_directory
  Path_create_file
  Path_link_source
  Path_link_target
  Path_open
  Fd_readdir
  Path_readlink
  Path_rename_source
  Path_rename_target
  Path_filestat_get
  Path_filestat_set_size
  Path_filestat_set_times
  Fd_filestat_get
  Fd_filestat_set_size
  Fd_filestat_set_times
  Path_symlink
  Path_remove_directory
  Path_unlink_file
  Poll_fd_readwrite
  Sock_shutdown
  Sock_accept
}

File descriptor rights, determining which actions may be performed.

Right
) ->
Bool
Bool
{
398 (
Rights
self
.
(self : Rights) -> UInt64

Convert newtype to its underlying type, automatically derived.

inner
()
(self : UInt64, other : UInt64) -> UInt64

Performs a bitwise AND operation between two unsigned 64-bit integers.

Parameters:

  • self : The first unsigned 64-bit integer operand.
  • other : The second unsigned 64-bit integer operand.

Returns the result of performing a bitwise AND operation on the two operands.

Example:

  let a = 0xF0F0F0F0F0F0F0F0UL
  let b = 0xFF00FF00FF00FF00UL
  inspect(a & b, content="17294086455919964160") // 0xF000F000F000F000
&
Right
right
.
(self : Right) -> UInt64
value
())
(x : UInt64, y : UInt64) -> Bool
!=
0
399} 400 401///| A file descriptor handle 402pub(all) type Fd
Int
Int
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
403 404///| A region of memory for scatter/gather reads. 405/// 406/// - `buf`: The address of the buffer to be filled. 407/// - `buf_len`: The length of the buffer to be filled. 408pub(all) struct IOVec { 409
Int
buf
:
Int
Int
410
Size
buf_len
:
type Size UInt
Size
411} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
412 413///| A region of memory for scatter/gather writes. 414/// 415/// - `buf`: The address of the buffer to be written. 416/// - `buf_len`: The length of the buffer to be written. 417pub(all) struct CIOVec { 418
Int
buf
:
Int
Int
419
Size
buf_len
:
type Size UInt
Size
420} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
421 422///| Relative offset within a file. 423pub(all) type FileDelta
Int64
Int64
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
424 425///| The position relative to which to set the offset of the file descriptor 426pub(all) enum Whence { 427
Whence
Set
428
Whence
Cur
429
Whence
End
430} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
431 432///| 433pub fn
enum Whence {
  Set
  Cur
  End
}

The position relative to which to set the offset of the file descriptor

Whence
::
(self : Whence) -> UInt
value
(
Whence
self
:
enum Whence {
  Set
  Cur
  End
}

The position relative to which to set the offset of the file descriptor

Whence
) ->
UInt
UInt
{
434 match
Whence
self
{
435
Whence
Set
=> 0
436
Whence
Cur
=> 1
437
Whence
End
=> 2
438 } 439} 440 441///| 442pub fn
enum Whence {
  Set
  Cur
  End
}

The position relative to which to set the offset of the file descriptor

Whence
::
(value : UInt) -> Whence?
from_value
(
UInt
value
:
UInt
UInt
) ->
enum Whence {
  Set
  Cur
  End
}

The position relative to which to set the offset of the file descriptor

Whence
? {
443 match
UInt
value
{
444 0 =>
(Whence) -> Whence?
Some
(
Whence
Set
)
445 1 =>
(Whence) -> Whence?
Some
(
Whence
Cur
)
446 2 =>
(Whence) -> Whence?
Some
(
Whence
End
)
447 _ =>
Whence?
None
448 } 449} 450 451///| A reference to the offset of a directory entry. 452/// 453/// The value 0 signifies the start of the directory. 454pub(all) type DirCookie
UInt64
UInt64
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
455 456///| The type for the `dirent::d_namlen` field of `dirent` struct. 457pub(all) type DirNamlen
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
458 459///| File serial number that is unique within its file system. 460pub(all) type Inode
UInt64
UInt64
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
461 462///| The type of a file descriptor or file. 463/// 464/// - Unknown: The type of the file descriptor or file is unknown or is different from any of the other types specified. 465/// - Block_device: The file descriptor or file refers to a block device inode. 466/// - Character_device: The file descriptor or file refers to a character device inode. 467/// - Directory: The file descriptor or file refers to a directory inode. 468/// - Regular_file: The file descriptor or file refers to a regular file inode. 469/// - Socket_dgram: The file descriptor or file refers to a datagram socket. 470/// - Socket_stream: The file descriptor or file refers to a byte-stream socket. 471/// - Symbolic_link: The file refers to a symbolic link inode. 472pub(all) enum FileType { 473
FileType
Unknown
474
FileType
Block_device
475
FileType
Character_device
476
FileType
Directory
477
FileType
Regular_file
478
FileType
Socket_dgram
479
FileType
Socket_stream
480
FileType
Symbolic_link
481} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
482 483///| 484pub fn
enum FileType {
  Unknown
  Block_device
  Character_device
  Directory
  Regular_file
  Socket_dgram
  Socket_stream
  Symbolic_link
}

The type of a file descriptor or file.

  • Unknown: The type of the file descriptor or file is unknown or is different from any of the other types specified.
  • Block_device: The file descriptor or file refers to a block device inode.
  • Character_device: The file descriptor or file refers to a character device inode.
  • Directory: The file descriptor or file refers to a directory inode.
  • Regular_file: The file descriptor or file refers to a regular file inode.
  • Socket_dgram: The file descriptor or file refers to a datagram socket.
  • Socket_stream: The file descriptor or file refers to a byte-stream socket.
  • Symbolic_link: The file refers to a symbolic link inode.
FileType
::
(self : FileType) -> Int
value
(
FileType
self
:
enum FileType {
  Unknown
  Block_device
  Character_device
  Directory
  Regular_file
  Socket_dgram
  Socket_stream
  Symbolic_link
}

The type of a file descriptor or file.

  • Unknown: The type of the file descriptor or file is unknown or is different from any of the other types specified.
  • Block_device: The file descriptor or file refers to a block device inode.
  • Character_device: The file descriptor or file refers to a character device inode.
  • Directory: The file descriptor or file refers to a directory inode.
  • Regular_file: The file descriptor or file refers to a regular file inode.
  • Socket_dgram: The file descriptor or file refers to a datagram socket.
  • Socket_stream: The file descriptor or file refers to a byte-stream socket.
  • Symbolic_link: The file refers to a symbolic link inode.
FileType
) ->
Int
Int
{
485 match
FileType
self
{
486
FileType
Unknown
=> 0
487
FileType
Block_device
=> 1
488
FileType
Character_device
=> 2
489
FileType
Directory
=> 3
490
FileType
Regular_file
=> 4
491
FileType
Socket_dgram
=> 5
492
FileType
Socket_stream
=> 6
493
FileType
Symbolic_link
=> 7
494 } 495} 496 497///| 498pub fn
enum FileType {
  Unknown
  Block_device
  Character_device
  Directory
  Regular_file
  Socket_dgram
  Socket_stream
  Symbolic_link
}

The type of a file descriptor or file.

  • Unknown: The type of the file descriptor or file is unknown or is different from any of the other types specified.
  • Block_device: The file descriptor or file refers to a block device inode.
  • Character_device: The file descriptor or file refers to a character device inode.
  • Directory: The file descriptor or file refers to a directory inode.
  • Regular_file: The file descriptor or file refers to a regular file inode.
  • Socket_dgram: The file descriptor or file refers to a datagram socket.
  • Socket_stream: The file descriptor or file refers to a byte-stream socket.
  • Symbolic_link: The file refers to a symbolic link inode.
FileType
::
(value : Int) -> FileType?
from_value
(
Int
value
:
Int
Int
) ->
enum FileType {
  Unknown
  Block_device
  Character_device
  Directory
  Regular_file
  Socket_dgram
  Socket_stream
  Symbolic_link
}

The type of a file descriptor or file.

  • Unknown: The type of the file descriptor or file is unknown or is different from any of the other types specified.
  • Block_device: The file descriptor or file refers to a block device inode.
  • Character_device: The file descriptor or file refers to a character device inode.
  • Directory: The file descriptor or file refers to a directory inode.
  • Regular_file: The file descriptor or file refers to a regular file inode.
  • Socket_dgram: The file descriptor or file refers to a datagram socket.
  • Socket_stream: The file descriptor or file refers to a byte-stream socket.
  • Symbolic_link: The file refers to a symbolic link inode.
FileType
? {
499 match
Int
value
{
500 0 =>
(FileType) -> FileType?
Some
(
FileType
Unknown
)
501 1 =>
(FileType) -> FileType?
Some
(
FileType
Block_device
)
502 2 =>
(FileType) -> FileType?
Some
(
FileType
Character_device
)
503 3 =>
(FileType) -> FileType?
Some
(
FileType
Directory
)
504 4 =>
(FileType) -> FileType?
Some
(
FileType
Regular_file
)
505 5 =>
(FileType) -> FileType?
Some
(
FileType
Socket_dgram
)
506 6 =>
(FileType) -> FileType?
Some
(
FileType
Socket_stream
)
507 7 =>
(FileType) -> FileType?
Some
(
FileType
Symbolic_link
)
508 _ =>
FileType?
None
509 } 510} 511 512///| A directory entry. 513/// 514/// - `d_next`: The offset of the next directory entry stored in the buffer. 515/// - `d_ino`: The serial number of the file referred to by this directory entry. 516/// - `d_namlen`: The length of the name of the directory entry. 517/// - `d_type`: The type of the file referred to by this directory entry. 518pub(all) struct DirEnt { 519
DirCookie
d_next
:
type DirCookie UInt64

A reference to the offset of a directory entry.

The value 0 signifies the start of the directory.

DirCookie
520
Inode
d_ino
:
type Inode UInt64

File serial number that is unique within its file system.

Inode
521
DirNamlen
d_namlen
:
type DirNamlen UInt

The type for the dirent::d_namlen field of dirent struct.

DirNamlen
522
FileType
d_type
:
enum FileType {
  Unknown
  Block_device
  Character_device
  Directory
  Regular_file
  Socket_dgram
  Socket_stream
  Symbolic_link
}

The type of a file descriptor or file.

  • Unknown: The type of the file descriptor or file is unknown or is different from any of the other types specified.
  • Block_device: The file descriptor or file refers to a block device inode.
  • Character_device: The file descriptor or file refers to a character device inode.
  • Directory: The file descriptor or file refers to a directory inode.
  • Regular_file: The file descriptor or file refers to a regular file inode.
  • Socket_dgram: The file descriptor or file refers to a datagram socket.
  • Socket_stream: The file descriptor or file refers to a byte-stream socket.
  • Symbolic_link: The file refers to a symbolic link inode.
FileType
523} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
524 525///| File or memory access pattern advisory information. 526/// 527/// - Normal: The application has no advice to give on its behavior with respect to the specified data. 528/// - Sequential: The application expects to access the specified data sequentially from lower offsets to higher offsets. 529/// - Random: The application expects to access the specified data in a random order. 530/// - Willneed: The application expects to access the specified data in the near future. 531/// - Dontneed: The application expects that it will not access the specified data in the near future. 532/// - Noreuse: The application expects to access the specified data once and then not reuse it afterwards. 533pub(all) enum Advice { 534
Advice
Normal
535
Advice
Sequential
536
Advice
Random
537
Advice
Willneed
538
Advice
Dontneed
539
Advice
Noreuse
540} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
541 542///| 543pub fn
enum Advice {
  Normal
  Sequential
  Random
  Willneed
  Dontneed
  Noreuse
}

File or memory access pattern advisory information.

  • Normal: The application has no advice to give on its behavior with respect to the specified data.
  • Sequential: The application expects to access the specified data sequentially from lower offsets to higher offsets.
  • Random: The application expects to access the specified data in a random order.
  • Willneed: The application expects to access the specified data in the near future.
  • Dontneed: The application expects that it will not access the specified data in the near future.
  • Noreuse: The application expects to access the specified data once and then not reuse it afterwards.
Advice
::
(self : Advice) -> UInt
value
(
Advice
self
:
enum Advice {
  Normal
  Sequential
  Random
  Willneed
  Dontneed
  Noreuse
}

File or memory access pattern advisory information.

  • Normal: The application has no advice to give on its behavior with respect to the specified data.
  • Sequential: The application expects to access the specified data sequentially from lower offsets to higher offsets.
  • Random: The application expects to access the specified data in a random order.
  • Willneed: The application expects to access the specified data in the near future.
  • Dontneed: The application expects that it will not access the specified data in the near future.
  • Noreuse: The application expects to access the specified data once and then not reuse it afterwards.
Advice
) ->
UInt
UInt
{
544 match
Advice
self
{
545
Advice
Normal
=> 0
546
Advice
Sequential
=> 1
547
Advice
Random
=> 2
548
Advice
Willneed
=> 3
549
Advice
Dontneed
=> 4
550
Advice
Noreuse
=> 5
551 } 552} 553 554///| 555pub fn
enum Advice {
  Normal
  Sequential
  Random
  Willneed
  Dontneed
  Noreuse
}

File or memory access pattern advisory information.

  • Normal: The application has no advice to give on its behavior with respect to the specified data.
  • Sequential: The application expects to access the specified data sequentially from lower offsets to higher offsets.
  • Random: The application expects to access the specified data in a random order.
  • Willneed: The application expects to access the specified data in the near future.
  • Dontneed: The application expects that it will not access the specified data in the near future.
  • Noreuse: The application expects to access the specified data once and then not reuse it afterwards.
Advice
::
(value : UInt) -> Advice?
from_value
(
UInt
value
:
UInt
UInt
) ->
enum Advice {
  Normal
  Sequential
  Random
  Willneed
  Dontneed
  Noreuse
}

File or memory access pattern advisory information.

  • Normal: The application has no advice to give on its behavior with respect to the specified data.
  • Sequential: The application expects to access the specified data sequentially from lower offsets to higher offsets.
  • Random: The application expects to access the specified data in a random order.
  • Willneed: The application expects to access the specified data in the near future.
  • Dontneed: The application expects that it will not access the specified data in the near future.
  • Noreuse: The application expects to access the specified data once and then not reuse it afterwards.
Advice
? {
556 match
UInt
value
{
557 0 =>
(Advice) -> Advice?
Some
(
Advice
Normal
)
558 1 =>
(Advice) -> Advice?
Some
(
Advice
Sequential
)
559 2 =>
(Advice) -> Advice?
Some
(
Advice
Random
)
560 3 =>
(Advice) -> Advice?
Some
(
Advice
Willneed
)
561 4 =>
(Advice) -> Advice?
Some
(
Advice
Dontneed
)
562 5 =>
(Advice) -> Advice?
Some
(
Advice
Noreuse
)
563 _ =>
Advice?
None
564 } 565} 566 567///| File descriptor flag. 568pub(all) type FdFlags
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
569 570///| 571pub fn
type FdFlags UInt

File descriptor flag.

FdFlags
::
() -> FdFlags
new
() ->
type FdFlags UInt

File descriptor flag.

FdFlags
{
572 0 573} 574 575///| File descriptor flags. 576/// 577/// - Append: Append mode: Data written to the file is always appended to the file's end. 578/// - Dsync: Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized. 579/// - Nonblock: Non-blocking mode. 580/// - Rsync: Synchronized read I/O operations. 581/// - Sync: Write according to synchronized I/O file integrity completion. In addition to synchronizing the data stored in the file, the implementation may also synchronously update the file's metadata. 582pub(all) enum FdFlag { 583
FdFlag
Append
584
FdFlag
Dsync
585
FdFlag
Nonblock
586
FdFlag
Rsync
587
FdFlag
Sync
588} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
589 590///| 591pub fn
enum FdFlag {
  Append
  Dsync
  Nonblock
  Rsync
  Sync
}

File descriptor flags.

  • Append: Append mode: Data written to the file is always appended to the file's end.
  • Dsync: Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized.
  • Nonblock: Non-blocking mode.
  • Rsync: Synchronized read I/O operations.
  • Sync: Write according to synchronized I/O file integrity completion. In addition to synchronizing the data stored in the file, the implementation may also synchronously update the file's metadata.
FdFlag
::
(self : FdFlag) -> UInt
value
(
FdFlag
self
:
enum FdFlag {
  Append
  Dsync
  Nonblock
  Rsync
  Sync
}

File descriptor flags.

  • Append: Append mode: Data written to the file is always appended to the file's end.
  • Dsync: Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized.
  • Nonblock: Non-blocking mode.
  • Rsync: Synchronized read I/O operations.
  • Sync: Write according to synchronized I/O file integrity completion. In addition to synchronizing the data stored in the file, the implementation may also synchronously update the file's metadata.
FdFlag
) ->
UInt
UInt
{
592 match
FdFlag
self
{
593
FdFlag
Append
=> 1
594
FdFlag
Dsync
=> 2
595
FdFlag
Nonblock
=> 4
596
FdFlag
Rsync
=> 8
597
FdFlag
Sync
=> 16
598 } 599} 600 601///| 602pub fn
type FdFlags UInt

File descriptor flag.

FdFlags
::
(self : FdFlags, flag : FdFlag) -> FdFlags
set
(
FdFlags
self
:
type FdFlags UInt

File descriptor flag.

FdFlags
,
FdFlag
flag
:
enum FdFlag {
  Append
  Dsync
  Nonblock
  Rsync
  Sync
}

File descriptor flags.

  • Append: Append mode: Data written to the file is always appended to the file's end.
  • Dsync: Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized.
  • Nonblock: Non-blocking mode.
  • Rsync: Synchronized read I/O operations.
  • Sync: Write according to synchronized I/O file integrity completion. In addition to synchronizing the data stored in the file, the implementation may also synchronously update the file's metadata.
FdFlag
) ->
type FdFlags UInt

File descriptor flag.

FdFlags
{
603
FdFlags
self
.
(self : FdFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
|
FdFlag
flag
.
(self : FdFlag) -> UInt
value
()
604} 605 606///| 607pub fn
type FdFlags UInt

File descriptor flag.

FdFlags
::
(self : FdFlags, flag : FdFlag) -> FdFlags
unset
(
FdFlags
self
:
type FdFlags UInt

File descriptor flag.

FdFlags
,
FdFlag
flag
:
enum FdFlag {
  Append
  Dsync
  Nonblock
  Rsync
  Sync
}

File descriptor flags.

  • Append: Append mode: Data written to the file is always appended to the file's end.
  • Dsync: Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized.
  • Nonblock: Non-blocking mode.
  • Rsync: Synchronized read I/O operations.
  • Sync: Write according to synchronized I/O file integrity completion. In addition to synchronizing the data stored in the file, the implementation may also synchronously update the file's metadata.
FdFlag
) ->
type FdFlags UInt

File descriptor flag.

FdFlags
{
608
FdFlags
self
.
(self : FdFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
(
FdFlag
flag
.
(self : FdFlag) -> UInt
value
()
(UInt, UInt) -> UInt
^
0)
609} 610 611///| 612pub fn
type FdFlags UInt

File descriptor flag.

FdFlags
::
(self : FdFlags, flag : FdFlag) -> Bool
is_set
(
FdFlags
self
:
type FdFlags UInt

File descriptor flag.

FdFlags
,
FdFlag
flag
:
enum FdFlag {
  Append
  Dsync
  Nonblock
  Rsync
  Sync
}

File descriptor flags.

  • Append: Append mode: Data written to the file is always appended to the file's end.
  • Dsync: Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized.
  • Nonblock: Non-blocking mode.
  • Rsync: Synchronized read I/O operations.
  • Sync: Write according to synchronized I/O file integrity completion. In addition to synchronizing the data stored in the file, the implementation may also synchronously update the file's metadata.
FdFlag
) ->
Bool
Bool
{
613 (
FdFlags
self
.
(self : FdFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
FdFlag
flag
.
(self : FdFlag) -> UInt
value
())
(x : UInt, y : UInt) -> Bool
!=
0
614} 615 616///| File descriptor attributes. 617/// 618/// - `fs_filetype`: File type. 619/// - `fs_flags`: File descriptor flags. 620/// - `fs_rights_base`: Rights that apply to this file descriptor. 621/// - `fs_rights_inheriting`: Maximum set of rights that may be installed on new file descriptors that are created through this file descriptor, e.g., through `path_open`. 622pub(all) struct FdStat { 623
FileType
fs_filetype
:
enum FileType {
  Unknown
  Block_device
  Character_device
  Directory
  Regular_file
  Socket_dgram
  Socket_stream
  Symbolic_link
}

The type of a file descriptor or file.

  • Unknown: The type of the file descriptor or file is unknown or is different from any of the other types specified.
  • Block_device: The file descriptor or file refers to a block device inode.
  • Character_device: The file descriptor or file refers to a character device inode.
  • Directory: The file descriptor or file refers to a directory inode.
  • Regular_file: The file descriptor or file refers to a regular file inode.
  • Socket_dgram: The file descriptor or file refers to a datagram socket.
  • Socket_stream: The file descriptor or file refers to a byte-stream socket.
  • Symbolic_link: The file refers to a symbolic link inode.
FileType
624
FdFlags
fs_flags
:
type FdFlags UInt

File descriptor flag.

FdFlags
625
Rights
fs_rights_base
:
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
626
Rights
fs_rights_inheriting
:
type Rights UInt64

File descriptor rights, determining which actions may be performed.

Rights
627} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
628 629///| Identifier for a device containing a file system. Can be used in combination 630/// with `inode` to uniquely identify a file or directory in the filesystem. 631pub(all) type Device
UInt64
UInt64
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
632 633///| Which file time attributes to adjust 634pub(all) type FstFlags
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
635 636///| 637pub fn
type FstFlags UInt

Which file time attributes to adjust

FstFlags
::
() -> FstFlags
new
() ->
type FstFlags UInt

Which file time attributes to adjust

FstFlags
{
638 0 639} 640 641///| Which file time attributes to adjust 642/// 643/// - Atim: Adjust the last access timestamp to the value stored in `filestat::atim`. 644/// - Atim_now: Adjust the last access timestamp to the time of clock `clockid::realtime`. 645/// - Mtim: Adjust the last modification timestamp to the value stored in `filestat::mtim`. 646/// - Mtim_now: Adjust the last modification timestamp to the time of clock `clockid::realtime`. 647pub(all) enum FstFlag { 648
FstFlag
Atim
649
FstFlag
Atim_now
650
FstFlag
Mtim
651
FstFlag
Mtim_now
652} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
653 654///| 655pub fn
enum FstFlag {
  Atim
  Atim_now
  Mtim
  Mtim_now
}

Which file time attributes to adjust

  • Atim: Adjust the last access timestamp to the value stored in filestat::atim.
  • Atim_now: Adjust the last access timestamp to the time of clock clockid::realtime.
  • Mtim: Adjust the last modification timestamp to the value stored in filestat::mtim.
  • Mtim_now: Adjust the last modification timestamp to the time of clock clockid::realtime.
FstFlag
::
(self : FstFlag) -> UInt
value
(
FstFlag
self
:
enum FstFlag {
  Atim
  Atim_now
  Mtim
  Mtim_now
}

Which file time attributes to adjust

  • Atim: Adjust the last access timestamp to the value stored in filestat::atim.
  • Atim_now: Adjust the last access timestamp to the time of clock clockid::realtime.
  • Mtim: Adjust the last modification timestamp to the value stored in filestat::mtim.
  • Mtim_now: Adjust the last modification timestamp to the time of clock clockid::realtime.
FstFlag
) ->
UInt
UInt
{
656 match
FstFlag
self
{
657
FstFlag
Atim
=> 1
658
FstFlag
Atim_now
=> 2
659
FstFlag
Mtim
=> 4
660
FstFlag
Mtim_now
=> 8
661 } 662} 663 664///| 665pub fn
type FstFlags UInt

Which file time attributes to adjust

FstFlags
::
(self : FstFlags, flag : FstFlag) -> FstFlags
set
(
FstFlags
self
:
type FstFlags UInt

Which file time attributes to adjust

FstFlags
,
FstFlag
flag
:
enum FstFlag {
  Atim
  Atim_now
  Mtim
  Mtim_now
}

Which file time attributes to adjust

  • Atim: Adjust the last access timestamp to the value stored in filestat::atim.
  • Atim_now: Adjust the last access timestamp to the time of clock clockid::realtime.
  • Mtim: Adjust the last modification timestamp to the value stored in filestat::mtim.
  • Mtim_now: Adjust the last modification timestamp to the time of clock clockid::realtime.
FstFlag
) ->
type FstFlags UInt

Which file time attributes to adjust

FstFlags
{
666
FstFlags
self
.
(self : FstFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
|
FstFlag
flag
.
(self : FstFlag) -> UInt
value
()
667} 668 669///| 670pub fn
type FstFlags UInt

Which file time attributes to adjust

FstFlags
::
(self : FstFlags, flag : FstFlag) -> FstFlags
unset
(
FstFlags
self
:
type FstFlags UInt

Which file time attributes to adjust

FstFlags
,
FstFlag
flag
:
enum FstFlag {
  Atim
  Atim_now
  Mtim
  Mtim_now
}

Which file time attributes to adjust

  • Atim: Adjust the last access timestamp to the value stored in filestat::atim.
  • Atim_now: Adjust the last access timestamp to the time of clock clockid::realtime.
  • Mtim: Adjust the last modification timestamp to the value stored in filestat::mtim.
  • Mtim_now: Adjust the last modification timestamp to the time of clock clockid::realtime.
FstFlag
) ->
type FstFlags UInt

Which file time attributes to adjust

FstFlags
{
671
FstFlags
self
.
(self : FstFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
(
FstFlag
flag
.
(self : FstFlag) -> UInt
value
()
(UInt, UInt) -> UInt
^
0)
672} 673 674///| 675pub fn
type FstFlags UInt

Which file time attributes to adjust

FstFlags
::
(self : FstFlags, flag : FstFlag) -> Bool
is_set
(
FstFlags
self
:
type FstFlags UInt

Which file time attributes to adjust

FstFlags
,
FstFlag
flag
:
enum FstFlag {
  Atim
  Atim_now
  Mtim
  Mtim_now
}

Which file time attributes to adjust

  • Atim: Adjust the last access timestamp to the value stored in filestat::atim.
  • Atim_now: Adjust the last access timestamp to the time of clock clockid::realtime.
  • Mtim: Adjust the last modification timestamp to the value stored in filestat::mtim.
  • Mtim_now: Adjust the last modification timestamp to the time of clock clockid::realtime.
FstFlag
) ->
Bool
Bool
{
676 (
FstFlags
self
.
(self : FstFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
FstFlag
flag
.
(self : FstFlag) -> UInt
value
())
(x : UInt, y : UInt) -> Bool
!=
0
677} 678 679///| Flags dermining the method of how paths are resolved. 680pub(all) type LookupFlags
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
681 682///| 683pub fn
type LookupFlags UInt

Flags dermining the method of how paths are resolved.

LookupFlags
::
() -> LookupFlags
new
() ->
type LookupFlags UInt

Flags dermining the method of how paths are resolved.

LookupFlags
{
684 0 685} 686 687///| 688pub(all) enum LookupFlag { 689
LookupFlag
Symlink_follow
690} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
691 692///| 693pub fn
enum LookupFlag {
  Symlink_follow
}
LookupFlag
::
(self : LookupFlag) -> UInt
value
(
LookupFlag
self
:
enum LookupFlag {
  Symlink_follow
}
LookupFlag
) ->
UInt
UInt
{
694 match
LookupFlag
self
{
695
LookupFlag
Symlink_follow
=> 1
696 } 697} 698 699///| 700pub fn
type LookupFlags UInt

Flags dermining the method of how paths are resolved.

LookupFlags
::
(self : LookupFlags, flag : LookupFlag) -> LookupFlags
set
(
LookupFlags
self
:
type LookupFlags UInt

Flags dermining the method of how paths are resolved.

LookupFlags
,
LookupFlag
flag
:
enum LookupFlag {
  Symlink_follow
}
LookupFlag
) ->
type LookupFlags UInt

Flags dermining the method of how paths are resolved.

LookupFlags
{
701
LookupFlags
self
.
(self : LookupFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
|
LookupFlag
flag
.
(self : LookupFlag) -> UInt
value
()
702} 703 704///| 705pub fn
type LookupFlags UInt

Flags dermining the method of how paths are resolved.

LookupFlags
::
(self : LookupFlags, flag : LookupFlag) -> LookupFlags
unset
(
LookupFlags
self
:
type LookupFlags UInt

Flags dermining the method of how paths are resolved.

LookupFlags
,
LookupFlag
flag
:
enum LookupFlag {
  Symlink_follow
}
LookupFlag
) ->
type LookupFlags UInt

Flags dermining the method of how paths are resolved.

LookupFlags
{
706
LookupFlags
self
.
(self : LookupFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
(
LookupFlag
flag
.
(self : LookupFlag) -> UInt
value
()
(UInt, UInt) -> UInt
^
0)
707} 708 709///| 710pub fn
type LookupFlags UInt

Flags dermining the method of how paths are resolved.

LookupFlags
::
(self : LookupFlags, flag : LookupFlag) -> Bool
is_set
(
LookupFlags
self
:
type LookupFlags UInt

Flags dermining the method of how paths are resolved.

LookupFlags
,
LookupFlag
flag
:
enum LookupFlag {
  Symlink_follow
}
LookupFlag
) ->
Bool
Bool
{
711 (
LookupFlags
self
.
(self : LookupFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
LookupFlag
flag
.
(self : LookupFlag) -> UInt
value
())
(x : UInt, y : UInt) -> Bool
!=
0
712} 713 714///| Open flags used by `path_open`. 715pub(all) type OpenFlags
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
716 717///| 718pub fn
type OpenFlags UInt

Open flags used by path_open.

OpenFlags
::
() -> OpenFlags
new
() ->
type OpenFlags UInt

Open flags used by path_open.

OpenFlags
{
719 0 720} 721 722///| Open flags used by `path_open`. 723/// 724/// - Create: Create the file if it does not exist. 725/// - Directory: Fail if not a directory. 726/// - Excl: Fail if the file already exists. 727/// - Trunc: Truncate the file to size 0. 728pub(all) enum OpenFlag { 729
OpenFlag
Create
730
OpenFlag
Directory
731
OpenFlag
Excl
732
OpenFlag
Trunc
733} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
734 735///| 736pub fn
enum OpenFlag {
  Create
  Directory
  Excl
  Trunc
}

Open flags used by path_open.

  • Create: Create the file if it does not exist.
  • Directory: Fail if not a directory.
  • Excl: Fail if the file already exists.
  • Trunc: Truncate the file to size 0.
OpenFlag
::
(self : OpenFlag) -> UInt
value
(
OpenFlag
self
:
enum OpenFlag {
  Create
  Directory
  Excl
  Trunc
}

Open flags used by path_open.

  • Create: Create the file if it does not exist.
  • Directory: Fail if not a directory.
  • Excl: Fail if the file already exists.
  • Trunc: Truncate the file to size 0.
OpenFlag
) ->
UInt
UInt
{
737 match
OpenFlag
self
{
738
OpenFlag
Create
=> 1
739
OpenFlag
Directory
=> 2
740
OpenFlag
Excl
=> 4
741
OpenFlag
Trunc
=> 8
742 } 743} 744 745///| 746pub fn
type OpenFlags UInt

Open flags used by path_open.

OpenFlags
::
(self : OpenFlags, flag : OpenFlag) -> OpenFlags
set
(
OpenFlags
self
:
type OpenFlags UInt

Open flags used by path_open.

OpenFlags
,
OpenFlag
flag
:
enum OpenFlag {
  Create
  Directory
  Excl
  Trunc
}

Open flags used by path_open.

  • Create: Create the file if it does not exist.
  • Directory: Fail if not a directory.
  • Excl: Fail if the file already exists.
  • Trunc: Truncate the file to size 0.
OpenFlag
) ->
type OpenFlags UInt

Open flags used by path_open.

OpenFlags
{
747
OpenFlags
self
.
(self : OpenFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
|
OpenFlag
flag
.
(self : OpenFlag) -> UInt
value
()
748} 749 750///| 751pub fn
type OpenFlags UInt

Open flags used by path_open.

OpenFlags
::
(self : OpenFlags, flag : OpenFlag) -> OpenFlags
unset
(
OpenFlags
self
:
type OpenFlags UInt

Open flags used by path_open.

OpenFlags
,
OpenFlag
flag
:
enum OpenFlag {
  Create
  Directory
  Excl
  Trunc
}

Open flags used by path_open.

  • Create: Create the file if it does not exist.
  • Directory: Fail if not a directory.
  • Excl: Fail if the file already exists.
  • Trunc: Truncate the file to size 0.
OpenFlag
) ->
type OpenFlags UInt

Open flags used by path_open.

OpenFlags
{
752
OpenFlags
self
.
(self : OpenFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
(
OpenFlag
flag
.
(self : OpenFlag) -> UInt
value
()
(UInt, UInt) -> UInt
^
0)
753} 754 755///| 756pub fn
type OpenFlags UInt

Open flags used by path_open.

OpenFlags
::
(self : OpenFlags, flag : OpenFlag) -> Bool
is_set
(
OpenFlags
self
:
type OpenFlags UInt

Open flags used by path_open.

OpenFlags
,
OpenFlag
flag
:
enum OpenFlag {
  Create
  Directory
  Excl
  Trunc
}

Open flags used by path_open.

  • Create: Create the file if it does not exist.
  • Directory: Fail if not a directory.
  • Excl: Fail if the file already exists.
  • Trunc: Truncate the file to size 0.
OpenFlag
) ->
Bool
Bool
{
757 (
OpenFlags
self
.
(self : OpenFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
OpenFlag
flag
.
(self : OpenFlag) -> UInt
value
())
(x : UInt, y : UInt) -> Bool
!=
0
758} 759 760///| Number of hard links to an inode. 761pub(all) type LinkCount
UInt64
UInt64
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
762 763///| File attributes. 764/// 765/// - `dev`: Device ID of device containing the file. 766/// - `ino`: File serial number. 767/// - `filetype`: File type. 768/// - `nlink`: Number of hard links to the file. 769/// - `size`: For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link. 770/// - `atim`: Last data access timestamp. This can be 0 if the underlying platform doesn't provide suitable timestamp for this file. 771/// - `mtim`: Last data modification timestamp. This can be 0 if the underlying platform doesn't provide suitable timestamp for this file. 772/// - `ctim`: Last file status change timestamp. This can be 0 if the underlying platform doesn't provide suitable timestamp for this file. 773pub(all) struct FileStat { 774
Device
dev
:
type Device UInt64

Identifier for a device containing a file system. Can be used in combination with inode to uniquely identify a file or directory in the filesystem.

Device
775
Inode
ino
:
type Inode UInt64

File serial number that is unique within its file system.

Inode
776
FileType
filetype
:
enum FileType {
  Unknown
  Block_device
  Character_device
  Directory
  Regular_file
  Socket_dgram
  Socket_stream
  Symbolic_link
}

The type of a file descriptor or file.

  • Unknown: The type of the file descriptor or file is unknown or is different from any of the other types specified.
  • Block_device: The file descriptor or file refers to a block device inode.
  • Character_device: The file descriptor or file refers to a character device inode.
  • Directory: The file descriptor or file refers to a directory inode.
  • Regular_file: The file descriptor or file refers to a regular file inode.
  • Socket_dgram: The file descriptor or file refers to a datagram socket.
  • Socket_stream: The file descriptor or file refers to a byte-stream socket.
  • Symbolic_link: The file refers to a symbolic link inode.
FileType
777
LinkCount
nlink
:
type LinkCount UInt64

Number of hard links to an inode.

LinkCount
778
FileSize
size
:
type FileSize UInt64

Non-negative file size or length of a region within a file.

FileSize
779
TimeStamp
atim
:
type TimeStamp UInt64

Timestamp in nanoseconds.

TimeStamp
780
TimeStamp
mtim
:
type TimeStamp UInt64

Timestamp in nanoseconds.

TimeStamp
781
TimeStamp
ctim
:
type TimeStamp UInt64

Timestamp in nanoseconds.

TimeStamp
782} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
783 784///| User-provided value that may be attached to objects that is retained when 785/// extracted from the implementation. 786pub(all) type Userdata
UInt64
UInt64
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
787 788///| Type of a subscription to an event or its occurrence. 789/// 790/// - Clock: The time value of clock `subscription_clock::id` has reached timestamp `subscription_clock::timeout`. 791/// - Fd_read: File descriptor `subscription_fd_readwrite::file_descriptor` has data available for reading. This event always triggers for regular files. 792/// - Fd_write: File descriptor `subscription_fd_readwrite::file_descriptor` has capacity available for writing. This event always triggers for regular files. 793pub(all) enum EventType { 794
EventType
Clock
795
EventType
Fd_read
796
EventType
Fd_write
797} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
798 799///| 800pub fn
enum EventType {
  Clock
  Fd_read
  Fd_write
}

Type of a subscription to an event or its occurrence.

  • Clock: The time value of clock subscription_clock::id has reached timestamp subscription_clock::timeout.
  • Fd_read: File descriptor subscription_fd_readwrite::file_descriptor has data available for reading. This event always triggers for regular files.
  • Fd_write: File descriptor subscription_fd_readwrite::file_descriptor has capacity available for writing. This event always triggers for regular files.
EventType
::
(self : EventType) -> UInt
value
(
EventType
self
:
enum EventType {
  Clock
  Fd_read
  Fd_write
}

Type of a subscription to an event or its occurrence.

  • Clock: The time value of clock subscription_clock::id has reached timestamp subscription_clock::timeout.
  • Fd_read: File descriptor subscription_fd_readwrite::file_descriptor has data available for reading. This event always triggers for regular files.
  • Fd_write: File descriptor subscription_fd_readwrite::file_descriptor has capacity available for writing. This event always triggers for regular files.
EventType
) ->
UInt
UInt
{
801 match
EventType
self
{
802
EventType
Clock
=> 0
803
EventType
Fd_read
=> 1
804
EventType
Fd_write
=> 2
805 } 806} 807 808///| 809pub fn
enum EventType {
  Clock
  Fd_read
  Fd_write
}

Type of a subscription to an event or its occurrence.

  • Clock: The time value of clock subscription_clock::id has reached timestamp subscription_clock::timeout.
  • Fd_read: File descriptor subscription_fd_readwrite::file_descriptor has data available for reading. This event always triggers for regular files.
  • Fd_write: File descriptor subscription_fd_readwrite::file_descriptor has capacity available for writing. This event always triggers for regular files.
EventType
::
(value : UInt) -> EventType?
from_value
(
UInt
value
:
UInt
UInt
) ->
enum EventType {
  Clock
  Fd_read
  Fd_write
}

Type of a subscription to an event or its occurrence.

  • Clock: The time value of clock subscription_clock::id has reached timestamp subscription_clock::timeout.
  • Fd_read: File descriptor subscription_fd_readwrite::file_descriptor has data available for reading. This event always triggers for regular files.
  • Fd_write: File descriptor subscription_fd_readwrite::file_descriptor has capacity available for writing. This event always triggers for regular files.
EventType
? {
810 match
UInt
value
{
811 0 =>
(EventType) -> EventType?
Some
(
EventType
Clock
)
812 1 =>
(EventType) -> EventType?
Some
(
EventType
Fd_read
)
813 2 =>
(EventType) -> EventType?
Some
(
EventType
Fd_write
)
814 _ =>
EventType?
None
815 } 816} 817 818///| The state of the file descriptor subscribed to with `eventtype::fd_read` or `eventtype::fd_write`. 819pub(all) type EventRWFlags
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
820 821///| 822pub fn
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
::
() -> EventRWFlags
new
() ->
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
{
823 0 824} 825 826///| The state of the file descriptor subscribed to with `eventtype::fd_read` or `eventtype::fd_write`. 827/// 828/// - Fd_readwrite_hangup: The peer of this socket has closed or disconnected. 829pub(all) enum EventRWFlag { 830
EventRWFlag
Fd_readwrite_hangup
831} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
832 833///| 834pub fn
enum EventRWFlag {
  Fd_readwrite_hangup
}

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

  • Fd_readwrite_hangup: The peer of this socket has closed or disconnected.
EventRWFlag
::
(self : EventRWFlag) -> UInt
value
(
EventRWFlag
self
:
enum EventRWFlag {
  Fd_readwrite_hangup
}

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

  • Fd_readwrite_hangup: The peer of this socket has closed or disconnected.
EventRWFlag
) ->
UInt
UInt
{
835 match
EventRWFlag
self
{
836
EventRWFlag
Fd_readwrite_hangup
=> 1
837 } 838} 839 840///| 841pub fn
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
::
(self : EventRWFlags, flag : EventRWFlag) -> EventRWFlags
set
(
842
EventRWFlags
self
:
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
,
843
EventRWFlag
flag
:
enum EventRWFlag {
  Fd_readwrite_hangup
}

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

  • Fd_readwrite_hangup: The peer of this socket has closed or disconnected.
EventRWFlag
844) ->
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
{
845
(UInt) -> EventRWFlags

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
(
EventRWFlags
self
.
(self : EventRWFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
|
EventRWFlag
flag
.
(self : EventRWFlag) -> UInt
value
())
846} 847 848///| 849pub fn
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
::
(self : EventRWFlags, flag : EventRWFlag) -> EventRWFlags
unset
(
850
EventRWFlags
self
:
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
,
851
EventRWFlag
flag
:
enum EventRWFlag {
  Fd_readwrite_hangup
}

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

  • Fd_readwrite_hangup: The peer of this socket has closed or disconnected.
EventRWFlag
852) ->
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
{
853
(UInt) -> EventRWFlags

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
(
EventRWFlags
self
.
(self : EventRWFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
(
EventRWFlag
flag
.
(self : EventRWFlag) -> UInt
value
()
(UInt, UInt) -> UInt
^
0))
854} 855 856///| 857pub fn
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
::
(self : EventRWFlags, flag : EventRWFlag) -> Bool
is_set
(
EventRWFlags
self
:
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
,
EventRWFlag
flag
:
enum EventRWFlag {
  Fd_readwrite_hangup
}

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

  • Fd_readwrite_hangup: The peer of this socket has closed or disconnected.
EventRWFlag
) ->
Bool
Bool
{
858 (
EventRWFlags
self
.
(self : EventRWFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
EventRWFlag
flag
.
(self : EventRWFlag) -> UInt
value
())
(x : UInt, y : UInt) -> Bool
!=
0
859} 860 861///| The contents of an `event` when type is `eventtype::fd_read` or 862/// `eventtype::fd_write`. 863/// 864/// - `nbytes`: Number of bytes available for reading or writing. 865/// - `flags`: The state of the file descriptor. 866pub(all) struct Event_fd_readwrite { 867
FileSize
nbytes
:
type FileSize UInt64

Non-negative file size or length of a region within a file.

FileSize
868
EventRWFlags
flags
:
type EventRWFlags UInt

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

EventRWFlags
869} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
870 871///| An event that occurred. 872/// 873/// - `userdata`: User-provided value that got attched to `subscription::userdata`. 874/// - `error`: If non-zero, an error that occurred while processing the subscription request. 875/// - `type_`: The type of the event that occurred. 876/// - `fd_readwrite`: The contents of the event, if it is an `eventtype::fd_read` or `eventtype::fd_write`. `eventtype::clock` events ignore this field. 877pub(all) struct Event { 878
Userdata
userdata
:
type Userdata UInt64

User-provided value that may be attached to objects that is retained when extracted from the implementation.

Userdata
879
Errno
error
:
type! Errno {
  Success
  TooBig
  Acces
  Addrinuse
  Addrnotavail
  Afnosupport
  Again
  Already
  Badf
  Badmsg
  Busy
  Canceled
  Child
  Connaborted
  Connrefused
  Connreset
  Deadlock
  Destaddrreq
  Dom
  Dquot
  Exist
  Fault
  Fbig
  Hostunreach
  Idrm
  Ilseq
  Inprogress
  Intr
  Inval
  IO
  Isconn
  Isdir
  Loop
  Mfile
  Mlink
  Msgsize
  Multihop
  Nametoolong
  Netdown
  Netreset
  Netunreach
  Nfile
  Nobufs
  Nodev
  Noent
  Noexec
  Nolck
  Nolink
  Nomem
  Nomsg
  Noprotoopt
  Nospc
  Nosys
  Notconn
  Notdir
  Notempty
  Notrecoverable
  Notsock
  Notsup
  Notty
  Nxio
  Overflow
  Ownerdead
  Perm
  Pipe
  Proto
  Protonosupport
  Prototype
  Range
  Rofs
  Spipe
  Srch
  Stale
  Timedout
  Txtbsy
  Xdev
  Notcapable
}

Error codes returned by functions. Not all of these error codes are returned by the functions provided by this API; some are used in higher-level library layers, and others are provided merely for alignment with POSIX.

See : https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#-errno-variant

Errno
880
EventType
type_
:
enum EventType {
  Clock
  Fd_read
  Fd_write
}

Type of a subscription to an event or its occurrence.

  • Clock: The time value of clock subscription_clock::id has reached timestamp subscription_clock::timeout.
  • Fd_read: File descriptor subscription_fd_readwrite::file_descriptor has data available for reading. This event always triggers for regular files.
  • Fd_write: File descriptor subscription_fd_readwrite::file_descriptor has capacity available for writing. This event always triggers for regular files.
EventType
881
Event_fd_readwrite
fd_readwrite
:
struct Event_fd_readwrite {
  nbytes: FileSize
  flags: EventRWFlags
}

The contents of an event when type is eventtype::fd_read or eventtype::fd_write.

  • nbytes: Number of bytes available for reading or writing.
  • flags: The state of the file descriptor.
Event_fd_readwrite
882} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
883 884///| Flags determining how to interpret the timestamp provided in `subscription::timeout`. 885pub(all) type SubclockFlags
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
886 887///| 888pub fn
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
::
() -> SubclockFlags
new
() ->
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
{
889 0 890} 891 892///| Flags determining how to interpret the timestamp provided in `subscription::timeout`. 893/// 894/// - Subscription_clock_abstime: 895/// If set, treat the timestamp provided in 896/// `subscription_clock::timeout` as an absolute timestamp of clock 897/// `subscription_clock::id`. If clear, treat the timestamp 898/// provided in `subscription_clock::timeout` relative to the 899/// current time value of clock `subscription_clock::id`. 900pub(all) enum SubclockFlag { 901
SubclockFlag
Subscription_clock_abstime
902} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
903 904///| 905pub fn
enum SubclockFlag {
  Subscription_clock_abstime
}

Flags determining how to interpret the timestamp provided in subscription::timeout.

  • Subscription_clock_abstime: If set, treat the timestamp provided in subscription_clock::timeout as an absolute timestamp of clock subscription_clock::id. If clear, treat the timestamp provided in subscription_clock::timeout relative to the current time value of clock subscription_clock::id.
SubclockFlag
::
(self : SubclockFlag) -> UInt
value
(
SubclockFlag
self
:
enum SubclockFlag {
  Subscription_clock_abstime
}

Flags determining how to interpret the timestamp provided in subscription::timeout.

  • Subscription_clock_abstime: If set, treat the timestamp provided in subscription_clock::timeout as an absolute timestamp of clock subscription_clock::id. If clear, treat the timestamp provided in subscription_clock::timeout relative to the current time value of clock subscription_clock::id.
SubclockFlag
) ->
UInt
UInt
{
906 match
SubclockFlag
self
{
907
SubclockFlag
Subscription_clock_abstime
=> 1
908 } 909} 910 911///| 912pub fn
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
::
(self : SubclockFlags, flag : SubclockFlag) -> SubclockFlags
set
(
913
SubclockFlags
self
:
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
,
914
SubclockFlag
flag
:
enum SubclockFlag {
  Subscription_clock_abstime
}

Flags determining how to interpret the timestamp provided in subscription::timeout.

  • Subscription_clock_abstime: If set, treat the timestamp provided in subscription_clock::timeout as an absolute timestamp of clock subscription_clock::id. If clear, treat the timestamp provided in subscription_clock::timeout relative to the current time value of clock subscription_clock::id.
SubclockFlag
915) ->
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
{
916
SubclockFlags
self
.
(self : SubclockFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
|
SubclockFlag
flag
.
(self : SubclockFlag) -> UInt
value
()
917} 918 919///| 920pub fn
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
::
(self : SubclockFlags, flag : SubclockFlag) -> SubclockFlags
unset
(
921
SubclockFlags
self
:
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
,
922
SubclockFlag
flag
:
enum SubclockFlag {
  Subscription_clock_abstime
}

Flags determining how to interpret the timestamp provided in subscription::timeout.

  • Subscription_clock_abstime: If set, treat the timestamp provided in subscription_clock::timeout as an absolute timestamp of clock subscription_clock::id. If clear, treat the timestamp provided in subscription_clock::timeout relative to the current time value of clock subscription_clock::id.
SubclockFlag
923) ->
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
{
924
SubclockFlags
self
.
(self : SubclockFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
(
SubclockFlag
flag
.
(self : SubclockFlag) -> UInt
value
()
(UInt, UInt) -> UInt
^
0)
925} 926 927///| 928pub fn
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
::
(self : SubclockFlags, flag : SubclockFlag) -> Bool
is_set
(
SubclockFlags
self
:
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
,
SubclockFlag
flag
:
enum SubclockFlag {
  Subscription_clock_abstime
}

Flags determining how to interpret the timestamp provided in subscription::timeout.

  • Subscription_clock_abstime: If set, treat the timestamp provided in subscription_clock::timeout as an absolute timestamp of clock subscription_clock::id. If clear, treat the timestamp provided in subscription_clock::timeout relative to the current time value of clock subscription_clock::id.
SubclockFlag
) ->
Bool
Bool
{
929 (
SubclockFlags
self
.
(self : SubclockFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
SubclockFlag
flag
.
(self : SubclockFlag) -> UInt
value
())
(x : UInt, y : UInt) -> Bool
!=
0
930} 931 932///| The contents of a `subscription` when type is `eventtype::clock`. 933/// 934/// - `id`: The clock against which to compare the timestamp. 935/// - `timeout`: The absolute or relative timestamp. 936/// - `precision`: The amount of time that the implementation may wait additionally to coalesce with other events. 937/// - `flags`: Flags specifying whether the timeout is absolute or relative. 938pub(all) struct Subscription_clock { 939
ClockId
id
:
enum ClockId {
  RealTime
  Monotonic
  ProcessCPUTimeId
  ThreadCPUTimeId
}

Identifiers for clocks.

  • Realtime: The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z.
  • Monotonic: The store-wide monotonic clock, which is defined as a clock measuring real time, whose value cannot be adjusted and which cannot have negative clock jumps. The epoch of this clock is undefined. The absolute time value of this clock therefore has no meaning.
  • ProcessCPUTimeId: The CPU-time clock associated with the current process.
  • ThreadCPUTimeId: The CPU-time clock associated with the current thread.
ClockId
940
TimeStamp
timeout
:
type TimeStamp UInt64

Timestamp in nanoseconds.

TimeStamp
941
TimeStamp
precision
:
type TimeStamp UInt64

Timestamp in nanoseconds.

TimeStamp
942
SubclockFlags
flags
:
type SubclockFlags UInt

Flags determining how to interpret the timestamp provided in subscription::timeout.

SubclockFlags
943} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
944 945///| The contents of a `subscription` when type is `eventtype::fd_read` or `eventtype::fd_write`. 946/// 947/// - `file_descriptor`: The file descriptor on which to wait for it to become ready for reading or writing. 948pub(all) struct Subscription_fd_readwrite { 949
Fd
file_descriptor
:
type Fd Int

A file descriptor handle

Fd
950} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
951 952///| The contents of a `subscription`. 953pub(all) enum Subscription_u { 954
(Subscription_clock) -> Subscription_u
Clock
(
struct Subscription_clock {
  id: ClockId
  timeout: TimeStamp
  precision: TimeStamp
  flags: SubclockFlags
}

The contents of a subscription when type is eventtype::clock.

  • id: The clock against which to compare the timestamp.
  • timeout: The absolute or relative timestamp.
  • precision: The amount of time that the implementation may wait additionally to coalesce with other events.
  • flags: Flags specifying whether the timeout is absolute or relative.
Subscription_clock
)
955
(Subscription_fd_readwrite) -> Subscription_u
Fd_read
(
struct Subscription_fd_readwrite {
  file_descriptor: Fd
}

The contents of a subscription when type is eventtype::fd_read or eventtype::fd_write.

  • file_descriptor: The file descriptor on which to wait for it to become ready for reading or writing.
Subscription_fd_readwrite
)
956
(Subscription_fd_readwrite) -> Subscription_u
Fd_write
(
struct Subscription_fd_readwrite {
  file_descriptor: Fd
}

The contents of a subscription when type is eventtype::fd_read or eventtype::fd_write.

  • file_descriptor: The file descriptor on which to wait for it to become ready for reading or writing.
Subscription_fd_readwrite
)
957} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
958 959///| Subscription to an event. 960/// 961/// - `userdata`: User-provided value that is attached to the subscription in the implementaiton and returned through `event::userdata`. 962/// - `u`: The type of the event to which to subscribe, and its contents. 963pub(all) struct Subscription { 964
Userdata
userdata
:
type Userdata UInt64

User-provided value that may be attached to objects that is retained when extracted from the implementation.

Userdata
965
Subscription_u
u
:
enum Subscription_u {
  Clock(Subscription_clock)
  Fd_read(Subscription_fd_readwrite)
  Fd_write(Subscription_fd_readwrite)
}

The contents of a subscription.

Subscription_u
966} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
967 968///| Exit code generated by a process when exiting. 969pub(all) type ExitCode
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
970 971///| Signal condition. 972/// 973/// - None: No signal. Note that POSIX has special semantics for kill(pid, 0), so this value is reserved. 974/// - Hup: Hangup. Action: Terminates the process. 975/// - Inte: Terminate interrupt signal. Action: Terminates the process. 976/// - Quit: Terminal quit signal. Action: Terminates the process. 977/// - Ill: Illegal instruction. Action: Terminates the process. 978/// - Trap: Trace/breakpoint trap. Action: Terminates the process. 979/// - Abrt: Process abort signal. Action: Terminates the process. 980/// - Bus: Access to an undefined portion of a memory object. Action: Terminates the process. 981/// - Fpe: Erroneous arithmetic operation. Action: Terminates the process. 982/// - Kill: Kill. Action: Terminates the process. 983/// - Usr1: User-defined signal 1. Action: Terminates the process. 984/// - Segv: Invalid memory reference. Action: Terminates the process. 985/// - Usr2: User-defined signal 2. Action: Terminates the process. 986/// - Pipe: Write on a pipe with no one to read it. Action: Ignored. 987/// - Alrm: Alarm clock. Action: Terminates the process. 988/// - Chld: Child process terminated, stopped, or continued. Action: Ignored. 989/// - Cont: Continue executing, if stopped. Action: Continues the process. 990/// - Stop: Stop executing. Action: Stops the process. 991/// - Tstp: Terminal stop signal. Action: Stops the process. 992/// - Ttin: Background process attempting read. Action: Stops the process. 993/// - Ttou: Background process attempting write. Action: Stops the process. 994/// - Urg: High bandwidth data is available at a socket. Action: Ignored. 995/// - Xcpu: CPU time limit exceeded. Action: Terminates the process. 996/// - Xfsz: File size limit exceeded. Action: Terminates the process. 997/// - Vtalrm: Virtual timer expired. Action: Terminates the process. 998/// - Prof: Profiling timer expired. Action: Terminates the process. 999/// - Winch: Window changed. Action: Ignored. 1000/// - Poll: I/O possible. Action: Terminates the process. 1001/// - Pwr: Power failure. Action: Terminates the process. 1002/// - Sys: Bad system call. Action: Terminates the process. 1003pub(all) enum Signal { 1004
Signal
None
1005
Signal
Hup
1006
Signal
Inte
1007
Signal
Quit
1008
Signal
Ill
1009
Signal
Trap
1010
Signal
Abrt
1011
Signal
Bus
1012
Signal
Fpe
1013
Signal
Kill
1014
Signal
Usr1
1015
Signal
Segv
1016
Signal
Usr2
1017
Signal
Pipe
1018
Signal
Alrm
1019
Signal
Term
1020
Signal
Chld
1021
Signal
Cont
1022
Signal
Stop
1023
Signal
Tstp
1024
Signal
Ttin
1025
Signal
Ttou
1026
Signal
Urg
1027
Signal
Xcpu
1028
Signal
Xfsz
1029
Signal
Vtalrm
1030
Signal
Prof
1031
Signal
Winch
1032
Signal
Poll
1033
Signal
Pwr
1034
Signal
Sys
1035} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1036 1037///| 1038pub fn
enum Signal {
  None
  Hup
  Inte
  Quit
  Ill
  Trap
  Abrt
  Bus
  Fpe
  Kill
  Usr1
  Segv
  Usr2
  Pipe
  Alrm
  Term
  Chld
  Cont
  Stop
  Tstp
  Ttin
  Ttou
  Urg
  Xcpu
  Xfsz
  Vtalrm
  Prof
  Winch
  Poll
  Pwr
  Sys
}

Signal condition.

  • None: No signal. Note that POSIX has special semantics for kill(pid, 0), so this value is reserved.
  • Hup: Hangup. Action: Terminates the process.
  • Inte: Terminate interrupt signal. Action: Terminates the process.
  • Quit: Terminal quit signal. Action: Terminates the process.
  • Ill: Illegal instruction. Action: Terminates the process.
  • Trap: Trace/breakpoint trap. Action: Terminates the process.
  • Abrt: Process abort signal. Action: Terminates the process.
  • Bus: Access to an undefined portion of a memory object. Action: Terminates the process.
  • Fpe: Erroneous arithmetic operation. Action: Terminates the process.
  • Kill: Kill. Action: Terminates the process.
  • Usr1: User-defined signal 1. Action: Terminates the process.
  • Segv: Invalid memory reference. Action: Terminates the process.
  • Usr2: User-defined signal 2. Action: Terminates the process.
  • Pipe: Write on a pipe with no one to read it. Action: Ignored.
  • Alrm: Alarm clock. Action: Terminates the process.
  • Chld: Child process terminated, stopped, or continued. Action: Ignored.
  • Cont: Continue executing, if stopped. Action: Continues the process.
  • Stop: Stop executing. Action: Stops the process.
  • Tstp: Terminal stop signal. Action: Stops the process.
  • Ttin: Background process attempting read. Action: Stops the process.
  • Ttou: Background process attempting write. Action: Stops the process.
  • Urg: High bandwidth data is available at a socket. Action: Ignored.
  • Xcpu: CPU time limit exceeded. Action: Terminates the process.
  • Xfsz: File size limit exceeded. Action: Terminates the process.
  • Vtalrm: Virtual timer expired. Action: Terminates the process.
  • Prof: Profiling timer expired. Action: Terminates the process.
  • Winch: Window changed. Action: Ignored.
  • Poll: I/O possible. Action: Terminates the process.
  • Pwr: Power failure. Action: Terminates the process.
  • Sys: Bad system call. Action: Terminates the process.
Signal
::
(self : Signal) -> UInt
value
(
Signal
self
:
enum Signal {
  None
  Hup
  Inte
  Quit
  Ill
  Trap
  Abrt
  Bus
  Fpe
  Kill
  Usr1
  Segv
  Usr2
  Pipe
  Alrm
  Term
  Chld
  Cont
  Stop
  Tstp
  Ttin
  Ttou
  Urg
  Xcpu
  Xfsz
  Vtalrm
  Prof
  Winch
  Poll
  Pwr
  Sys
}

Signal condition.

  • None: No signal. Note that POSIX has special semantics for kill(pid, 0), so this value is reserved.
  • Hup: Hangup. Action: Terminates the process.
  • Inte: Terminate interrupt signal. Action: Terminates the process.
  • Quit: Terminal quit signal. Action: Terminates the process.
  • Ill: Illegal instruction. Action: Terminates the process.
  • Trap: Trace/breakpoint trap. Action: Terminates the process.
  • Abrt: Process abort signal. Action: Terminates the process.
  • Bus: Access to an undefined portion of a memory object. Action: Terminates the process.
  • Fpe: Erroneous arithmetic operation. Action: Terminates the process.
  • Kill: Kill. Action: Terminates the process.
  • Usr1: User-defined signal 1. Action: Terminates the process.
  • Segv: Invalid memory reference. Action: Terminates the process.
  • Usr2: User-defined signal 2. Action: Terminates the process.
  • Pipe: Write on a pipe with no one to read it. Action: Ignored.
  • Alrm: Alarm clock. Action: Terminates the process.
  • Chld: Child process terminated, stopped, or continued. Action: Ignored.
  • Cont: Continue executing, if stopped. Action: Continues the process.
  • Stop: Stop executing. Action: Stops the process.
  • Tstp: Terminal stop signal. Action: Stops the process.
  • Ttin: Background process attempting read. Action: Stops the process.
  • Ttou: Background process attempting write. Action: Stops the process.
  • Urg: High bandwidth data is available at a socket. Action: Ignored.
  • Xcpu: CPU time limit exceeded. Action: Terminates the process.
  • Xfsz: File size limit exceeded. Action: Terminates the process.
  • Vtalrm: Virtual timer expired. Action: Terminates the process.
  • Prof: Profiling timer expired. Action: Terminates the process.
  • Winch: Window changed. Action: Ignored.
  • Poll: I/O possible. Action: Terminates the process.
  • Pwr: Power failure. Action: Terminates the process.
  • Sys: Bad system call. Action: Terminates the process.
Signal
) ->
UInt
UInt
{
1039 match
Signal
self
{
1040
Signal
None
=> 0
1041
Signal
Hup
=> 1
1042
Signal
Inte
=> 2
1043
Signal
Quit
=> 3
1044
Signal
Ill
=> 4
1045
Signal
Trap
=> 5
1046
Signal
Abrt
=> 6
1047
Signal
Bus
=> 7
1048
Signal
Fpe
=> 8
1049
Signal
Kill
=> 9
1050
Signal
Usr1
=> 10
1051
Signal
Segv
=> 11
1052
Signal
Usr2
=> 12
1053
Signal
Pipe
=> 13
1054
Signal
Alrm
=> 14
1055
Signal
Term
=> 15
1056
Signal
Chld
=> 16
1057
Signal
Cont
=> 17
1058
Signal
Stop
=> 18
1059
Signal
Tstp
=> 19
1060
Signal
Ttin
=> 20
1061
Signal
Ttou
=> 21
1062
Signal
Urg
=> 22
1063
Signal
Xcpu
=> 23
1064
Signal
Xfsz
=> 24
1065
Signal
Vtalrm
=> 25
1066
Signal
Prof
=> 26
1067
Signal
Winch
=> 27
1068
Signal
Poll
=> 28
1069
Signal
Pwr
=> 29
1070
Signal
Sys
=> 30
1071 } 1072} 1073 1074///| 1075pub fn
enum Signal {
  None
  Hup
  Inte
  Quit
  Ill
  Trap
  Abrt
  Bus
  Fpe
  Kill
  Usr1
  Segv
  Usr2
  Pipe
  Alrm
  Term
  Chld
  Cont
  Stop
  Tstp
  Ttin
  Ttou
  Urg
  Xcpu
  Xfsz
  Vtalrm
  Prof
  Winch
  Poll
  Pwr
  Sys
}

Signal condition.

  • None: No signal. Note that POSIX has special semantics for kill(pid, 0), so this value is reserved.
  • Hup: Hangup. Action: Terminates the process.
  • Inte: Terminate interrupt signal. Action: Terminates the process.
  • Quit: Terminal quit signal. Action: Terminates the process.
  • Ill: Illegal instruction. Action: Terminates the process.
  • Trap: Trace/breakpoint trap. Action: Terminates the process.
  • Abrt: Process abort signal. Action: Terminates the process.
  • Bus: Access to an undefined portion of a memory object. Action: Terminates the process.
  • Fpe: Erroneous arithmetic operation. Action: Terminates the process.
  • Kill: Kill. Action: Terminates the process.
  • Usr1: User-defined signal 1. Action: Terminates the process.
  • Segv: Invalid memory reference. Action: Terminates the process.
  • Usr2: User-defined signal 2. Action: Terminates the process.
  • Pipe: Write on a pipe with no one to read it. Action: Ignored.
  • Alrm: Alarm clock. Action: Terminates the process.
  • Chld: Child process terminated, stopped, or continued. Action: Ignored.
  • Cont: Continue executing, if stopped. Action: Continues the process.
  • Stop: Stop executing. Action: Stops the process.
  • Tstp: Terminal stop signal. Action: Stops the process.
  • Ttin: Background process attempting read. Action: Stops the process.
  • Ttou: Background process attempting write. Action: Stops the process.
  • Urg: High bandwidth data is available at a socket. Action: Ignored.
  • Xcpu: CPU time limit exceeded. Action: Terminates the process.
  • Xfsz: File size limit exceeded. Action: Terminates the process.
  • Vtalrm: Virtual timer expired. Action: Terminates the process.
  • Prof: Profiling timer expired. Action: Terminates the process.
  • Winch: Window changed. Action: Ignored.
  • Poll: I/O possible. Action: Terminates the process.
  • Pwr: Power failure. Action: Terminates the process.
  • Sys: Bad system call. Action: Terminates the process.
Signal
::
(value : UInt) -> Signal?
from_value
(
UInt
value
:
UInt
UInt
) ->
enum Signal {
  None
  Hup
  Inte
  Quit
  Ill
  Trap
  Abrt
  Bus
  Fpe
  Kill
  Usr1
  Segv
  Usr2
  Pipe
  Alrm
  Term
  Chld
  Cont
  Stop
  Tstp
  Ttin
  Ttou
  Urg
  Xcpu
  Xfsz
  Vtalrm
  Prof
  Winch
  Poll
  Pwr
  Sys
}

Signal condition.

  • None: No signal. Note that POSIX has special semantics for kill(pid, 0), so this value is reserved.
  • Hup: Hangup. Action: Terminates the process.
  • Inte: Terminate interrupt signal. Action: Terminates the process.
  • Quit: Terminal quit signal. Action: Terminates the process.
  • Ill: Illegal instruction. Action: Terminates the process.
  • Trap: Trace/breakpoint trap. Action: Terminates the process.
  • Abrt: Process abort signal. Action: Terminates the process.
  • Bus: Access to an undefined portion of a memory object. Action: Terminates the process.
  • Fpe: Erroneous arithmetic operation. Action: Terminates the process.
  • Kill: Kill. Action: Terminates the process.
  • Usr1: User-defined signal 1. Action: Terminates the process.
  • Segv: Invalid memory reference. Action: Terminates the process.
  • Usr2: User-defined signal 2. Action: Terminates the process.
  • Pipe: Write on a pipe with no one to read it. Action: Ignored.
  • Alrm: Alarm clock. Action: Terminates the process.
  • Chld: Child process terminated, stopped, or continued. Action: Ignored.
  • Cont: Continue executing, if stopped. Action: Continues the process.
  • Stop: Stop executing. Action: Stops the process.
  • Tstp: Terminal stop signal. Action: Stops the process.
  • Ttin: Background process attempting read. Action: Stops the process.
  • Ttou: Background process attempting write. Action: Stops the process.
  • Urg: High bandwidth data is available at a socket. Action: Ignored.
  • Xcpu: CPU time limit exceeded. Action: Terminates the process.
  • Xfsz: File size limit exceeded. Action: Terminates the process.
  • Vtalrm: Virtual timer expired. Action: Terminates the process.
  • Prof: Profiling timer expired. Action: Terminates the process.
  • Winch: Window changed. Action: Ignored.
  • Poll: I/O possible. Action: Terminates the process.
  • Pwr: Power failure. Action: Terminates the process.
  • Sys: Bad system call. Action: Terminates the process.
Signal
? {
1076 match
UInt
value
{
1077 0 =>
(Signal) -> Signal?
Some
(
Signal
None
)
1078 1 =>
(Signal) -> Signal?
Some
(
Signal
Hup
)
1079 2 =>
(Signal) -> Signal?
Some
(
Signal
Inte
)
1080 3 =>
(Signal) -> Signal?
Some
(
Signal
Quit
)
1081 4 =>
(Signal) -> Signal?
Some
(
Signal
Ill
)
1082 5 =>
(Signal) -> Signal?
Some
(
Signal
Trap
)
1083 6 =>
(Signal) -> Signal?
Some
(
Signal
Abrt
)
1084 7 =>
(Signal) -> Signal?
Some
(
Signal
Bus
)
1085 8 =>
(Signal) -> Signal?
Some
(
Signal
Fpe
)
1086 9 =>
(Signal) -> Signal?
Some
(
Signal
Kill
)
1087 10 =>
(Signal) -> Signal?
Some
(
Signal
Usr1
)
1088 11 =>
(Signal) -> Signal?
Some
(
Signal
Segv
)
1089 12 =>
(Signal) -> Signal?
Some
(
Signal
Usr2
)
1090 13 =>
(Signal) -> Signal?
Some
(
Signal
Pipe
)
1091 14 =>
(Signal) -> Signal?
Some
(
Signal
Alrm
)
1092 15 =>
(Signal) -> Signal?
Some
(
Signal
Term
)
1093 16 =>
(Signal) -> Signal?
Some
(
Signal
Chld
)
1094 17 =>
(Signal) -> Signal?
Some
(
Signal
Cont
)
1095 18 =>
(Signal) -> Signal?
Some
(
Signal
Stop
)
1096 19 =>
(Signal) -> Signal?
Some
(
Signal
Tstp
)
1097 20 =>
(Signal) -> Signal?
Some
(
Signal
Ttin
)
1098 21 =>
(Signal) -> Signal?
Some
(
Signal
Ttou
)
1099 22 =>
(Signal) -> Signal?
Some
(
Signal
Urg
)
1100 23 =>
(Signal) -> Signal?
Some
(
Signal
Xcpu
)
1101 24 =>
(Signal) -> Signal?
Some
(
Signal
Xfsz
)
1102 25 =>
(Signal) -> Signal?
Some
(
Signal
Vtalrm
)
1103 26 =>
(Signal) -> Signal?
Some
(
Signal
Prof
)
1104 27 =>
(Signal) -> Signal?
Some
(
Signal
Winch
)
1105 28 =>
(Signal) -> Signal?
Some
(
Signal
Poll
)
1106 29 =>
(Signal) -> Signal?
Some
(
Signal
Pwr
)
1107 30 =>
(Signal) -> Signal?
Some
(
Signal
Sys
)
1108 _ =>
Signal?
None
1109 } 1110} 1111 1112///| Flags provided to `sock_recv`. 1113pub(all) type RiFlags
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1114 1115///| 1116pub fn
type RiFlags UInt

Flags provided to sock_recv.

RiFlags
::
() -> RiFlags
new
() ->
type RiFlags UInt

Flags provided to sock_recv.

RiFlags
{
1117 0 1118} 1119 1120///| Flags provided to `sock_recv`. 1121/// 1122/// - Recv_peek: Returns the message without removing it from the socket's receive queue. 1123/// - Recv_waitall: On byte-stream sockets, block until the full amount of data can be returned. 1124pub(all) enum RiFlag { 1125
RiFlag
Recv_peek
1126
RiFlag
Recv_waitall
1127} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1128 1129///| 1130pub fn
enum RiFlag {
  Recv_peek
  Recv_waitall
}

Flags provided to sock_recv.

  • Recv_peek: Returns the message without removing it from the socket's receive queue.
  • Recv_waitall: On byte-stream sockets, block until the full amount of data can be returned.
RiFlag
::
(self : RiFlag) -> UInt
value
(
RiFlag
self
:
enum RiFlag {
  Recv_peek
  Recv_waitall
}

Flags provided to sock_recv.

  • Recv_peek: Returns the message without removing it from the socket's receive queue.
  • Recv_waitall: On byte-stream sockets, block until the full amount of data can be returned.
RiFlag
) ->
UInt
UInt
{
1131 match
RiFlag
self
{
1132
RiFlag
Recv_peek
=> 1
1133
RiFlag
Recv_waitall
=> 2
1134 } 1135} 1136 1137///| 1138pub fn
type RiFlags UInt

Flags provided to sock_recv.

RiFlags
::
(self : RiFlags, flag : RiFlag) -> RiFlags
set
(
RiFlags
self
:
type RiFlags UInt

Flags provided to sock_recv.

RiFlags
,
RiFlag
flag
:
enum RiFlag {
  Recv_peek
  Recv_waitall
}

Flags provided to sock_recv.

  • Recv_peek: Returns the message without removing it from the socket's receive queue.
  • Recv_waitall: On byte-stream sockets, block until the full amount of data can be returned.
RiFlag
) ->
type RiFlags UInt

Flags provided to sock_recv.

RiFlags
{
1139
RiFlags
self
.
(self : RiFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
|
RiFlag
flag
.
(self : RiFlag) -> UInt
value
()
1140} 1141 1142///| 1143pub fn
type RiFlags UInt

Flags provided to sock_recv.

RiFlags
::
(self : RiFlags, flag : RiFlag) -> RiFlags
unset
(
RiFlags
self
:
type RiFlags UInt

Flags provided to sock_recv.

RiFlags
,
RiFlag
flag
:
enum RiFlag {
  Recv_peek
  Recv_waitall
}

Flags provided to sock_recv.

  • Recv_peek: Returns the message without removing it from the socket's receive queue.
  • Recv_waitall: On byte-stream sockets, block until the full amount of data can be returned.
RiFlag
) ->
type RiFlags UInt

Flags provided to sock_recv.

RiFlags
{
1144
RiFlags
self
.
(self : RiFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
(
RiFlag
flag
.
(self : RiFlag) -> UInt
value
()
(UInt, UInt) -> UInt
^
0)
1145} 1146 1147///| 1148pub fn
type RiFlags UInt

Flags provided to sock_recv.

RiFlags
::
(self : RiFlags, flag : RiFlag) -> Bool
is_set
(
RiFlags
self
:
type RiFlags UInt

Flags provided to sock_recv.

RiFlags
,
RiFlag
flag
:
enum RiFlag {
  Recv_peek
  Recv_waitall
}

Flags provided to sock_recv.

  • Recv_peek: Returns the message without removing it from the socket's receive queue.
  • Recv_waitall: On byte-stream sockets, block until the full amount of data can be returned.
RiFlag
) ->
Bool
Bool
{
1149 (
RiFlags
self
.
(self : RiFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
RiFlag
flag
.
(self : RiFlag) -> UInt
value
())
(x : UInt, y : UInt) -> Bool
!=
0
1150} 1151 1152///| Flags returned by `sock_recv`. 1153pub(all) type RoFlags
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1154 1155///| 1156pub fn
type RoFlags UInt

Flags returned by sock_recv.

RoFlags
::
() -> RoFlags
new
() ->
type RoFlags UInt

Flags returned by sock_recv.

RoFlags
{
1157 0 1158} 1159 1160///| Flags returned by `sock_recv`. 1161/// 1162/// - Recv_data_truncated: Returned by `sock_recv`: Message data has been truncated. 1163pub(all) enum RoFlag { 1164
RoFlag
Recv_data_truncated
1165} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1166 1167///| 1168pub fn
enum RoFlag {
  Recv_data_truncated
}

Flags returned by sock_recv.

  • Recv_data_truncated: Returned by sock_recv: Message data has been truncated.
RoFlag
::
(self : RoFlag) -> UInt
value
(
RoFlag
self
:
enum RoFlag {
  Recv_data_truncated
}

Flags returned by sock_recv.

  • Recv_data_truncated: Returned by sock_recv: Message data has been truncated.
RoFlag
) ->
UInt
UInt
{
1169 match
RoFlag
self
{
1170
RoFlag
Recv_data_truncated
=> 1
1171 } 1172} 1173 1174///| 1175pub fn
type RoFlags UInt

Flags returned by sock_recv.

RoFlags
::
(self : RoFlags, flag : RoFlag) -> RoFlags
set
(
RoFlags
self
:
type RoFlags UInt

Flags returned by sock_recv.

RoFlags
,
RoFlag
flag
:
enum RoFlag {
  Recv_data_truncated
}

Flags returned by sock_recv.

  • Recv_data_truncated: Returned by sock_recv: Message data has been truncated.
RoFlag
) ->
type RoFlags UInt

Flags returned by sock_recv.

RoFlags
{
1176
RoFlags
self
.
(self : RoFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
|
RoFlag
flag
.
(self : RoFlag) -> UInt
value
()
1177} 1178 1179///| 1180pub fn
type RoFlags UInt

Flags returned by sock_recv.

RoFlags
::
(self : RoFlags, flag : RoFlag) -> RoFlags
unset
(
RoFlags
self
:
type RoFlags UInt

Flags returned by sock_recv.

RoFlags
,
RoFlag
flag
:
enum RoFlag {
  Recv_data_truncated
}

Flags returned by sock_recv.

  • Recv_data_truncated: Returned by sock_recv: Message data has been truncated.
RoFlag
) ->
type RoFlags UInt

Flags returned by sock_recv.

RoFlags
{
1181
RoFlags
self
.
(self : RoFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
(
RoFlag
flag
.
(self : RoFlag) -> UInt
value
()
(UInt, UInt) -> UInt
^
0)
1182} 1183 1184///| 1185pub fn
type RoFlags UInt

Flags returned by sock_recv.

RoFlags
::
(self : RoFlags, flag : RoFlag) -> Bool
is_set
(
RoFlags
self
:
type RoFlags UInt

Flags returned by sock_recv.

RoFlags
,
RoFlag
flag
:
enum RoFlag {
  Recv_data_truncated
}

Flags returned by sock_recv.

  • Recv_data_truncated: Returned by sock_recv: Message data has been truncated.
RoFlag
) ->
Bool
Bool
{
1186 (
RoFlags
self
.
(self : RoFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
RoFlag
flag
.
(self : RoFlag) -> UInt
value
())
(x : UInt, y : UInt) -> Bool
!=
0
1187} 1188 1189///| Flags provided to `sock_send`. As there are currently no flags defined, it must be set to zero. 1190pub(all) type SiFlags
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1191 1192///| 1193pub fn
type SiFlags UInt

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

SiFlags
::
() -> SiFlags
new
() ->
type SiFlags UInt

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

SiFlags
{
1194 0 1195} 1196 1197///| Flags returned by `sock_send`. As there are currently no flags defined, it must be set to zero. 1198pub(all) enum SiFlag {} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1199 1200///| 1201pub fn
enum SiFlag {
}

Flags returned by sock_send. As there are currently no flags defined, it must be set to zero.

SiFlag
::
(self : SiFlag) -> UInt
value
(
SiFlag
self
:
enum SiFlag {
}

Flags returned by sock_send. As there are currently no flags defined, it must be set to zero.

SiFlag
) ->
UInt
UInt
{
1202 match
SiFlag
self
{
1203 _ =>
() -> UInt
panic
()
1204 } 1205} 1206 1207///| 1208pub fn
type SiFlags UInt

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

SiFlags
::
(self : SiFlags, flag : SiFlag) -> SiFlags
set
(
SiFlags
self
:
type SiFlags UInt

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

SiFlags
,
SiFlag
flag
:
enum SiFlag {
}

Flags returned by sock_send. As there are currently no flags defined, it must be set to zero.

SiFlag
) ->
type SiFlags UInt

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

SiFlags
{
1209
SiFlags
self
.
(self : SiFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
|
SiFlag
flag
.
(self : SiFlag) -> UInt
value
()
1210} 1211 1212///| 1213pub fn
type SiFlags UInt

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

SiFlags
::
(self : SiFlags, flag : SiFlag) -> SiFlags
unset
(
SiFlags
self
:
type SiFlags UInt

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

SiFlags
,
SiFlag
flag
:
enum SiFlag {
}

Flags returned by sock_send. As there are currently no flags defined, it must be set to zero.

SiFlag
) ->
type SiFlags UInt

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

SiFlags
{
1214
SiFlags
self
.
(self : SiFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
(
SiFlag
flag
.
(self : SiFlag) -> UInt
value
()
(UInt, UInt) -> UInt
^
0)
1215} 1216 1217///| 1218pub fn
type SiFlags UInt

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

SiFlags
::
(self : SiFlags, flag : SiFlag) -> Bool
is_set
(
SiFlags
self
:
type SiFlags UInt

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

SiFlags
,
SiFlag
flag
:
enum SiFlag {
}

Flags returned by sock_send. As there are currently no flags defined, it must be set to zero.

SiFlag
) ->
Bool
Bool
{
1219 (
SiFlags
self
.
(self : SiFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
SiFlag
flag
.
(self : SiFlag) -> UInt
value
())
(x : UInt, y : UInt) -> Bool
!=
0
1220} 1221 1222///| Which channels on a socket to shut down. 1223pub(all) type SdFlags
UInt
UInt
derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1224 1225///| 1226pub fn
type SdFlags UInt

Which channels on a socket to shut down.

SdFlags
::
() -> SdFlags
new
() ->
type SdFlags UInt

Which channels on a socket to shut down.

SdFlags
{
1227 0 1228} 1229 1230///| Which channels on a socket to shut down. 1231/// 1232/// - Rd: Disables further receive operations. 1233/// - Wr: Disables further send operations. 1234pub(all) enum SdFlag { 1235
SdFlag
Rd
1236
SdFlag
Wr
1237} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1238 1239///| 1240pub fn
enum SdFlag {
  Rd
  Wr
}

Which channels on a socket to shut down.

  • Rd: Disables further receive operations.
  • Wr: Disables further send operations.
SdFlag
::
(self : SdFlag) -> UInt
value
(
SdFlag
self
:
enum SdFlag {
  Rd
  Wr
}

Which channels on a socket to shut down.

  • Rd: Disables further receive operations.
  • Wr: Disables further send operations.
SdFlag
) ->
UInt
UInt
{
1241 match
SdFlag
self
{
1242
SdFlag
Rd
=> 1
1243
SdFlag
Wr
=> 2
1244 } 1245} 1246 1247///| 1248pub fn
type SdFlags UInt

Which channels on a socket to shut down.

SdFlags
::
(self : SdFlags, flag : SdFlag) -> SdFlags
set
(
SdFlags
self
:
type SdFlags UInt

Which channels on a socket to shut down.

SdFlags
,
SdFlag
flag
:
enum SdFlag {
  Rd
  Wr
}

Which channels on a socket to shut down.

  • Rd: Disables further receive operations.
  • Wr: Disables further send operations.
SdFlag
) ->
type SdFlags UInt

Which channels on a socket to shut down.

SdFlags
{
1249
SdFlags
self
.
(self : SdFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
|
SdFlag
flag
.
(self : SdFlag) -> UInt
value
()
1250} 1251 1252///| 1253pub fn
type SdFlags UInt

Which channels on a socket to shut down.

SdFlags
::
(self : SdFlags, flag : SdFlag) -> SdFlags
unset
(
SdFlags
self
:
type SdFlags UInt

Which channels on a socket to shut down.

SdFlags
,
SdFlag
flag
:
enum SdFlag {
  Rd
  Wr
}

Which channels on a socket to shut down.

  • Rd: Disables further receive operations.
  • Wr: Disables further send operations.
SdFlag
) ->
type SdFlags UInt

Which channels on a socket to shut down.

SdFlags
{
1254
SdFlags
self
.
(self : SdFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
(
SdFlag
flag
.
(self : SdFlag) -> UInt
value
()
(UInt, UInt) -> UInt
^
0)
1255} 1256 1257///| 1258pub fn
type SdFlags UInt

Which channels on a socket to shut down.

SdFlags
::
(self : SdFlags, flag : SdFlag) -> Bool
is_set
(
SdFlags
self
:
type SdFlags UInt

Which channels on a socket to shut down.

SdFlags
,
SdFlag
flag
:
enum SdFlag {
  Rd
  Wr
}

Which channels on a socket to shut down.

  • Rd: Disables further receive operations.
  • Wr: Disables further send operations.
SdFlag
) ->
Bool
Bool
{
1259 (
SdFlags
self
.
(self : SdFlags) -> UInt

Convert newtype to its underlying type, automatically derived.

inner
()
(UInt, UInt) -> UInt
&
SdFlag
flag
.
(self : SdFlag) -> UInt
value
())
(x : UInt, y : UInt) -> Bool
!=
0
1260} 1261 1262///| Identifiers for preopened capabilites. 1263/// 1264/// - Dir: A pre-opened directory. 1265pub(all) enum PreOpenType { 1266
PreOpenType
Dir
1267} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1268 1269///| 1270pub fn
enum PreOpenType {
  Dir
}

Identifiers for preopened capabilites.

  • Dir: A pre-opened directory.
PreOpenType
::
(self : PreOpenType) -> UInt
value
(
PreOpenType
self
:
enum PreOpenType {
  Dir
}

Identifiers for preopened capabilites.

  • Dir: A pre-opened directory.
PreOpenType
) ->
UInt
UInt
{
1271 match
PreOpenType
self
{
1272
PreOpenType
Dir
=> 0
1273 } 1274} 1275 1276///| 1277pub fn
enum PreOpenType {
  Dir
}

Identifiers for preopened capabilites.

  • Dir: A pre-opened directory.
PreOpenType
::
(value : UInt) -> PreOpenType?
from_value
(
UInt
value
:
UInt
UInt
) ->
enum PreOpenType {
  Dir
}

Identifiers for preopened capabilites.

  • Dir: A pre-opened directory.
PreOpenType
? {
1278 match
UInt
value
{
1279 0 =>
(PreOpenType) -> PreOpenType?
Some
(
PreOpenType
Dir
)
1280 _ =>
PreOpenType?
None
1281 } 1282} 1283 1284///| The content of a `prestat` when type is `preopentype::dir`. 1285/// 1286/// - `pr_name_len`: The length of the directory name for use with `fd_prestat_dir_name`. 1287pub(all) struct PreStat_dir { 1288
Size
pr_name_len
:
type Size UInt
Size
1289} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1290 1291///| Information about a pre-opened capability. 1292pub(all) enum PreStat { 1293
(PreStat_dir) -> PreStat
Dir
(
struct PreStat_dir {
  pr_name_len: Size
}

The content of a prestat when type is preopentype::dir.

  • pr_name_len: The length of the directory name for use with fd_prestat_dir_name.
PreStat_dir
)
1294} derive(
trait Eq {
  op_equal(Self, Self) -> Bool
}

Trait for types whose elements can test for equality

Eq
,
trait Show {
  output(Self, &Logger) -> Unit
  to_string(Self) -> String
}

Trait for types that can be converted to String

Show
)
1295 1296///| 1297pub let
Fd
stdin
:
type Fd Int

A file descriptor handle

Fd
= 0
1298 1299///| 1300pub let
Fd
stdout
:
type Fd Int

A file descriptor handle

Fd
= 1
1301 1302///| 1303pub let
Fd
stderr
:
type Fd Int

A file descriptor handle

Fd
= 2
1304