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

write

Public Function
std.os.uefi.protocol.serial_io.SerialIo.write
pub fn write(self: *SerialIo, buffer: []const u8) WriteError!usize

Writes data to a serial device.

Params

File

os/uefi/protocol/serial_io.zig:93
93
94
95
96
97
98
99
100
101
    pub fn write(self: *SerialIo, buffer: []const u8) WriteError!usize {
        var len: usize = buffer.len;
        switch (self._write(self, &len, buffer.ptr)) {
            .success => return len,
            .device_error => return error.DeviceError,
            .timeout => return error.Timeout,
            else => |status| return uefi.unexpectedStatus(status),
        }
    }