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 › Dispatch › async Private Function async Doc Source Private Function std.Io.Dispatch.async
fn async (
userdata : ?*anyopaque ,
result : []u8 ,
result_alignment : Alignment ,
context : []const u8 ,
context_alignment : Alignment ,
start : *const fn (context : *const anyopaque , result : *anyopaque ) void ,
) ?*std .Io .AnyFuture Params userdata : ?*anyopaque result : []u8 result_alignment : Alignment context : []const u8 context_alignment : Alignment start : *const fn (context : *const anyopaque , result : *anyopaque ) void File Io/Dispatch.zig: 1034
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047 fn async (
userdata : ?*anyopaque ,
result : []u8 ,
result_alignment : Alignment ,
context : []const u8 ,
context_alignment : Alignment ,
start : *const fn (context : *const anyopaque , result : *anyopaque ) void ,
) ?*std .Io .AnyFuture {
const ev : *Evented = @ptrCast (@alignCast (userdata ));
return concurrent (ev , result .len , result_alignment , context , context_alignment , start ) catch {
start (context .ptr , result .ptr );
return null ;
};
}