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/ › Serialize.zig › addOptionalResolvedTarget
addOptionalResolvedTarget
Serialize.addOptionalResolvedTarget
fn addOptionalResolvedTarget (
wc : *Configuration .Wip ,
optional_resolved_target : ?std .Build .ResolvedTarget ,
) !Configuration .ResolvedTarget .OptionalIndex
File
Code
fn addOptionalResolvedTarget (
wc : *Configuration .Wip ,
optional_resolved_target : ?std .Build .ResolvedTarget ,
) !Configuration .ResolvedTarget .OptionalIndex {
const resolved_target = optional_resolved_target orelse return .none ;
return .init (try wc .addDeduped (Configuration .ResolvedTarget , .{
.query = try wc .addTargetQuery (&resolved_target .query ),
.result = try wc .addTarget (resolved_target .result ),
}));
}