Function setData [src]

Prototype

pub fn setData( self: *const Ip6Config, comptime data_type: std.meta.Tag(DataType), payload: *const std.meta.TagPayload(DataType, data_type), ) SetDataError!void

Parameters

self: *const Ip6Configdata_type: std.meta.Tag(DataType)payload: *const std.meta.TagPayload(DataType, data_type)

Possible Errors

AccessDenied
BadBufferSize
DeviceError
InvalidParameter
NotReady
OutOfResources
Unexpected UnexpectedError
Unsupported
WriteProtected

Source

pub fn setData( self: *const Ip6Config, comptime data_type: std.meta.Tag(DataType), payload: *const std.meta.TagPayload(DataType, data_type), ) SetDataError!void { const data_size = @sizeOf(@TypeOf(payload)); switch (self._set_data(self, data_type, data_size, @ptrCast(payload))) { .success => {}, .invalid_parameter => return Error.InvalidParameter, .write_protected => return Error.WriteProtected, .access_denied => return Error.AccessDenied, .not_ready => return Error.NotReady, .bad_buffer_size => return Error.BadBufferSize, .unsupported => return Error.Unsupported, .out_of_resources => return Error.OutOfResources, .device_error => return Error.DeviceError, else => |status| return uefi.unexpectedStatus(status), } }