pub fn takeVarInt(r: *Reader, comptime Int: type, endian: std.builtin.Endian, n: usize) Error!Int
Asserts the buffer was initialized with a capacity at least n.
n
r: *Reader
Int: type
endian: std.builtin.Endian
n: usize
ReadFailed
See the Reader implementation for detailed diagnostics.
Reader
EndOfStream
1185 1186 1187 1188
pub fn takeVarInt(r: *Reader, comptime Int: type, endian: std.builtin.Endian, n: usize) Error!Int { assert(n <= @sizeOf(Int)); return std.mem.readVarInt(Int, try r.take(n), endian); }
Asserts the buffer was initialized with a capacity at least
n.