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 › protocol › file › File › getInfoSize Public Function getInfoSize Doc Source Public Function std.os.uefi.protocol.file.File.getInfoSize
pub fn getInfoSize (self : *const File , comptime info : std .meta .Tag (Info )) GetInfoError !usize Params File os/uefi/protocol/file.zig: 202
202
203
204
205
206
207
208
209
210
211
212
213
214 pub fn getInfoSize (self : *const File , comptime info : std .meta .Tag (Info )) GetInfoError !usize {
const InfoType = @FieldType (Info , @tagName (info ));
var len : usize = 0 ;
switch (self ._get_info (self , &InfoType .guid , &len , null )) {
.success , .buffer_too_small => return len ,
.unsupported => return error .Unsupported ,
.no_media => return error .NoMedia ,
.device_error => return error .DeviceError ,
.volume_corrupted => return error .VolumeCorrupted ,
else => |status | return uefi .unexpectedStatus (status ),
}
}