Struct varu64::nb::LengthValueLimitDecoder[][src]

pub struct LengthValueLimitDecoder(_, _);
Expand description

State for decoding a VarU64 followed by that many bytes into a Vec<u8>, erroring if the VarU64 is greater than a limit.

Implementations

Create a new LengthValueLimitDecoder, only accepting values up to length limit.

Decode a VarU64 from the input, then reads that many bytes into a Vec<u8>.

Returns how many bytes have been read. A None is returned if more input is needed.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.