pub enum DynamicSizeError {
NotContiguous(usize),
UnsufficientExactBytes(usize),
UnsufficientAtLeastBytes(usize),
}Variants§
NotContiguous(usize)
needed to get the size necessary before parsing. as we cannot undo the
advancing on a Buf. with std its possible to get around this
limitation by using bytes::chunks_vectored, however in no_std case we
need this error type.
parameters returns how many bytes AT LEAST need to be contiguous.
UnsufficientExactBytes(usize)
see FixedSizeError::UnsufficientExactBytes
FixedSizeError::UnsufficientExactBytes
FixedSizeError::UnsufficientExactBytes
UnsufficientAtLeastBytes(usize)
This means that the buffer has not enough bytes to read the length of
the dynamic part (e.g. there are not enough bytes to parse the fixed
part). Please catch this, and increase the buffer.
The buffer needs at least this size, hoewever it will prob fail with
a Self::UnsufficientExactBytes if you just provide n bytes and not
enough for the dynmapic part.
Self::UnsufficientExactBytes Self::UnsufficientExactBytes
Trait Implementations§
Source§impl Debug for DynamicSizeError
impl Debug for DynamicSizeError
Source§impl Display for DynamicSizeError
impl Display for DynamicSizeError
Source§impl Error for DynamicSizeError
Available on crate feature std only.
impl Error for DynamicSizeError
std only.