#[non_exhaustive]pub enum SequenceError {
LengthMismatch,
MatchTooShort {
index: usize,
},
OffsetTooFar {
index: usize,
},
ZeroOffset {
index: usize,
},
BlockTooLarge,
MatchMismatch {
index: usize,
},
}Expand description
Why a parse cannot build a valid frame.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LengthMismatch
The parse covers more bytes than the input holds, or, with explicit block delimiters, not exactly the input.
MatchTooShort
Sequence index has an offset but matches fewer than MIN_MATCH
bytes; a run of literals alone is a delimiter, with offset 0.
OffsetTooFar
Sequence index copies from further back than the output and the
dictionary reach, or than the window allows.
ZeroOffset
Sequence index has a match but no offset.
BlockTooLarge
A block between two delimiters is larger than max_block.
MatchMismatch
Sequence index copies bytes that differ from the ones the input has
where the copy lands, so the frame would decode to something else.
Trait Implementations§
Source§impl Clone for SequenceError
impl Clone for SequenceError
impl Copy for SequenceError
Source§impl Debug for SequenceError
impl Debug for SequenceError
Source§impl Display for SequenceError
impl Display for SequenceError
impl Eq for SequenceError
Source§impl Error for SequenceError
Available on crate feature std only.
impl Error for SequenceError
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SequenceError
impl PartialEq for SequenceError
impl StructuralPartialEq for SequenceError
Auto Trait Implementations§
impl Freeze for SequenceError
impl RefUnwindSafe for SequenceError
impl Send for SequenceError
impl Sync for SequenceError
impl Unpin for SequenceError
impl UnsafeUnpin for SequenceError
impl UnwindSafe for SequenceError
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