pub trait VarintDecode: Sized {
// Required method
fn varint_decode(data: &[u8]) -> Result<(usize, Self)>;
}Expand description
Required Methods§
Sourcefn varint_decode(data: &[u8]) -> Result<(usize, Self)>
fn varint_decode(data: &[u8]) -> Result<(usize, Self)>
Decode a type from a varint encoded series of bytes.
Signed values will be implicitly zig-zag decoded.
§Errors
Returns Error::OutOfRange if data does not contain a terminated
varint or if the decoded value exceeds the range of Self.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".