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.

userInputOptionsFromArgs

Build.userInputOptionsFromArgs
fn userInputOptionsFromArgs(arena: Allocator, args: anytype) UserInputOptionsMap

File

lib/std/Build.zig:409

Code

fn userInputOptionsFromArgs(arena: Allocator, args: anytype) UserInputOptionsMap {
    var map = UserInputOptionsMap.init(arena);
    const args_info = @typeInfo(@TypeOf(args)).@"struct";
    inline for (args_info.field_names, args_info.field_types) |field_name, field_type| {
        if (field_type == @TypeOf(null)) continue;
        addUserInputOptionFromArg(arena, &map, field_name, field_type, @field(args, field_name));
    }
    return map;
}