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 › getVariableSize Public Function getVariableSize Doc Source Public Function std.os.uefi.tables.runtime_services.RuntimeServices.getVariableSize
pub fn getVariableSize (
self : *const RuntimeServices ,
name : [*:0 ]const u16 ,
guid : *const Guid ,
) GetVariableSizeError !?struct Params File os/uefi/tables/runtime_services.zig: 248
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269 pub fn getVariableSize (
self : *const RuntimeServices ,
name : [*:0 ]const u16 ,
guid : *const Guid ,
) GetVariableSizeError !?struct { usize , VariableAttributes } {
var size : usize = 0 ;
var attrs : VariableAttributes = undefined ;
switch (self ._getVariable (
name ,
guid ,
&attrs ,
&size ,
null ,
)) {
.buffer_too_small => return .{ size , attrs },
.not_found => return null ,
.device_error => return error .DeviceError ,
.unsupported => return error .Unsupported ,
else => |status | return uefi .unexpectedStatus (status ),
}
}
Returns the length of the variable's data and its attributes.