Enum zip_core::raw::parse::DynamicSizeTotalSizeError
source · pub enum DynamicSizeTotalSizeError {
NotContiguous,
TotalSizeInFieldIsInvalid,
UnsufficientExactBytes(usize),
UnsufficientAtLeastBytes(usize),
}
Expand description
for some records, the zip convention choose to allow specifying the total
length in its fixed field, e.g. Zip64EndOfCentralDirectory
. Those fields
could specify a value < its fixed size, e.g. 0 which would be totally
invalid and unexpected, as it would mean that we shouldn’t even concider its
signature at this point.
Variants§
NotContiguous
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.
TotalSizeInFieldIsInvalid
UnsufficientExactBytes(usize)
UnsufficientAtLeastBytes(usize)
Trait Implementations§
source§impl Debug for DynamicSizeTotalSizeError
impl Debug for DynamicSizeTotalSizeError
source§impl From<FixedSizeError> for DynamicSizeTotalSizeError
impl From<FixedSizeError> for DynamicSizeTotalSizeError
source§fn from(value: FixedSizeError) -> Self
fn from(value: FixedSizeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DynamicSizeTotalSizeError
impl RefUnwindSafe for DynamicSizeTotalSizeError
impl Send for DynamicSizeTotalSizeError
impl Sync for DynamicSizeTotalSizeError
impl Unpin for DynamicSizeTotalSizeError
impl UnwindSafe for DynamicSizeTotalSizeError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more