Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › Io › Uring › Fiber › CancelStatus › Awaiting Private Enum Awaiting Doc Source Private Enum std.Io.Uring.Fiber.CancelStatus.Awaiting
const Awaiting = enum (u31 ) Functions File Io/Uring.zig: 173
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197 const Awaiting = enum (u31 ) {
nothing = std .math .maxInt (u31 ),
group = std .math .maxInt (u31 ) - 1 ,
/// An io_uring fd.
_ ,
fn subWrap (lhs : Awaiting , rhs : Awaiting ) Awaiting {
return @fromBackingInt (@intCast (@backingInt (lhs ) -% @backingInt (rhs )));
}
fn fromIoUringFd (fd : fd_t ) Awaiting {
const awaiting : Awaiting = @fromBackingInt (@intCast (fd ));
switch (awaiting ) {
.nothing , .group => unreachable ,
_ => return awaiting ,
}
}
fn toIoUringFd (awaiting : Awaiting ) fd_t {
switch (awaiting ) {
.nothing , .group => unreachable ,
_ => return @backingInt (awaiting ),
}
}
}