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 › simple_network › SimpleNetwork › statistics Public Function statistics Doc Source Public Function std.os.uefi.protocol.simple_network.SimpleNetwork.statistics
pub fn statistics (self : *SimpleNetwork , reset_flag : bool ) StatisticsError !Statistics Params File os/uefi/protocol/simple_network.zig: 224
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240 pub fn statistics (self : *SimpleNetwork , reset_flag : bool ) StatisticsError !Statistics {
var stats : Statistics = undefined ;
var stats_size : usize = @sizeOf (Statistics );
switch (self ._statistics (self , reset_flag , &stats_size , &stats )) {
.success => {},
.not_started => return error .NotStarted ,
.invalid_parameter => return error .InvalidParameter ,
.device_error => return error .DeviceError ,
.unsupported => return error .Unsupported ,
else => |status | return uefi .unexpectedStatus (status ),
}
if (stats_size != @sizeOf (Statistics ))
return error .Unexpected
else
return stats ;
}
Resets or collects the statistics on a network interface.