Enum zip_core::raw::parse::DynamicSizeError
source · 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
impl Error for DynamicSizeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<DynamicSizeError> for DynamicSizeTotalSizeError
impl From<DynamicSizeError> for DynamicSizeTotalSizeError
source§fn from(value: DynamicSizeError) -> Self
fn from(value: DynamicSizeError) -> Self
source§impl PartialEq for DynamicSizeError
impl PartialEq for DynamicSizeError
source§fn eq(&self, other: &DynamicSizeError) -> bool
fn eq(&self, other: &DynamicSizeError) -> bool
self
and other
values to be equal, and is used
by ==
.