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 › closeProtocol Public Function closeProtocol Doc Source Public Function std.os.uefi.tables.boot_services.BootServices.closeProtocol
pub fn closeProtocol (
self : *BootServices ,
handle : Handle ,
Protocol : type ,
agent : Handle ,
controller : ?Handle ,
) CloseProtocolError !void Params File os/uefi/tables/boot_services.zig: 1031
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052 pub fn closeProtocol (
self : *BootServices ,
handle : Handle ,
Protocol : type ,
agent : Handle ,
controller : ?Handle ,
) CloseProtocolError !void {
if (!@hasDecl (Protocol , "guid" ))
@compileError ("protocol is missing guid: " ++ @typeName (Protocol ));
switch (self ._closeProtocol (
handle ,
&Protocol .guid ,
agent ,
controller ,
)) {
.success => {},
.invalid_parameter => return error .InvalidParameter ,
.not_found => return error .NotFound ,
else => |status | return uefi .unexpectedStatus (status ),
}
}