Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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. Public Function

statistics

Public Function
std.os.uefi.protocol.simple_network.SimpleNetwork.statistics
pub fn statistics(self: *SimpleNetwork, reset_flag: bool) StatisticsError!Statistics

Resets or collects the statistics on a network interface.

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;
    }