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 › os › uefi › tables › runtime_services › RuntimeServices › setVariable Public Function setVariable Doc Source Public Function std.os.uefi.tables.runtime_services.RuntimeServices.setVariable
pub fn setVariable (
self : *RuntimeServices ,
name : [*:0 ]const u16 ,
guid : *const Guid ,
attributes : VariableAttributes ,
data : []const u8 ,
) SetVariableError !void Params File os/uefi/tables/runtime_services.zig: 310
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334 pub fn setVariable (
self : *RuntimeServices ,
name : [*:0 ]const u16 ,
guid : *const Guid ,
attributes : VariableAttributes ,
data : []const u8 ,
) SetVariableError !void {
switch (self ._setVariable (
name ,
guid ,
attributes ,
data .len ,
data .ptr ,
)) {
.success => {},
.invalid_parameter => return error .InvalidParameter ,
.out_of_resources => return error .OutOfResources ,
.device_error => return error .DeviceError ,
.write_protected => return error .WriteProtected ,
.security_violation => return error .SecurityViolation ,
.not_found => return error .NotFound ,
.unsupported => return error .Unsupported ,
else => |status | return uefi .unexpectedStatus (status ),
}
}