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 library itself.
Zig › std/ › Build.zig › OrderedUserInputOption
OrderedUserInputOption
Build.OrderedUserInputOption
const OrderedUserInputOption = struct
File
Code
const OrderedUserInputOption = struct {
name : []const u8 ,
value : OrderedUserValue ,
used : bool ,
fn hash (opt : OrderedUserInputOption , hasher : *std .hash .Wyhash ) void {
hasher .update (opt .name );
opt .value .hash (hasher );
}
fn fromUnordered (allocator : Allocator , user_input_option : UserInputOption ) OrderedUserInputOption {
return OrderedUserInputOption {
.name = user_input_option .name ,
.used = user_input_option .used ,
.value = OrderedUserValue .fromUnordered (allocator , user_input_option .value ),
};
}
fn lessThan (_ : void , lhs : OrderedUserInputOption , rhs : OrderedUserInputOption ) bool {
return std .ascii .lessThanIgnoreCase (lhs .name , rhs .name );
}
}