std.bytes
le/be fixed-width ints at any offset in a byte slice; no alignment needed checked in every build mode: .out_of_bounds, and nothing read or written
BytesError
Section titled “BytesError”pub BytesError :: errors { out_of_bounds,}out_of_bounds: value would run past the slice end
read_u8
Section titled “read_u8”pub read_u8 :: fn(self: []const u8, off: usize) -> u8 ! BytesErrorwrite_u8
Section titled “write_u8”pub write_u8 :: fn(self: []u8, off: usize, v: u8) -> void ! BytesErrorread_u16_le
Section titled “read_u16_le”pub read_u16_le :: fn(self: []const u8, off: usize) -> u16 ! BytesErrorread_u16_be
Section titled “read_u16_be”pub read_u16_be :: fn(self: []const u8, off: usize) -> u16 ! BytesErrorread_u32_le
Section titled “read_u32_le”pub read_u32_le :: fn(self: []const u8, off: usize) -> u32 ! BytesErrorread_u32_be
Section titled “read_u32_be”pub read_u32_be :: fn(self: []const u8, off: usize) -> u32 ! BytesErrorread_u64_le
Section titled “read_u64_le”pub read_u64_le :: fn(self: []const u8, off: usize) -> u64 ! BytesErrorread_u64_be
Section titled “read_u64_be”pub read_u64_be :: fn(self: []const u8, off: usize) -> u64 ! BytesErrorwrite_u16_le
Section titled “write_u16_le”pub write_u16_le :: fn(self: []u8, off: usize, v: u16) -> void ! BytesErrorwrite_u16_be
Section titled “write_u16_be”pub write_u16_be :: fn(self: []u8, off: usize, v: u16) -> void ! BytesErrorwrite_u32_le
Section titled “write_u32_le”pub write_u32_le :: fn(self: []u8, off: usize, v: u32) -> void ! BytesErrorwrite_u32_be
Section titled “write_u32_be”pub write_u32_be :: fn(self: []u8, off: usize, v: u32) -> void ! BytesErrorwrite_u64_le
Section titled “write_u64_le”pub write_u64_le :: fn(self: []u8, off: usize, v: u64) -> void ! BytesErrorwrite_u64_be
Section titled “write_u64_be”pub write_u64_be :: fn(self: []u8, off: usize, v: u64) -> void ! BytesError