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 › boot_services › BootServices › locateProtocol Public Function locateProtocol Doc Source Public Function std.os.uefi.tables.boot_services.BootServices.locateProtocol
pub fn locateProtocol (
self : *const BootServices ,
Protocol : type ,
registration : ?EventRegistration ,
) LocateProtocolError !?*Protocol Params File os/uefi/tables/boot_services.zig: 1116
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133 pub fn locateProtocol (
self : *const BootServices ,
Protocol : type ,
registration : ?EventRegistration ,
) LocateProtocolError !?*Protocol {
var interface : *Protocol = undefined ;
switch (self ._locateProtocol (
&Protocol .guid ,
registration ,
@ptrCast (&interface ),
)) {
.success => return interface ,
.not_found => return null ,
.invalid_parameter => return error .InvalidParameter ,
else => |status | return uefi .unexpectedStatus (status ),
}
}