#[non_exhaustive]pub enum SlipError {
Io(Error),
UnexpectedEndOfFrame,
IncompleteEscape,
InvalidEscape(u8),
MissingFrame,
MultipleFrames(usize),
}Expand description
Error type for SLIP encoding and decoding operations.
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.
Io(Error)
Wrapper around std::io::Error originating from the underlying reader or writer.
UnexpectedEndOfFrame
Encountered bytes that were not terminated by an END delimiter.
IncompleteEscape
Encountered an ESC byte at the end of a stream without a following escape code.
InvalidEscape(u8)
Encountered an invalid escape sequence while decoding.
MissingFrame
No complete SLIP frame was present in the input while one was expected.
MultipleFrames(usize)
More frames than expected were present in the input.
Trait Implementations§
Source§impl Error for SlipError
impl Error for SlipError
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()
Auto Trait Implementations§
impl Freeze for SlipError
impl !RefUnwindSafe for SlipError
impl Send for SlipError
impl Sync for SlipError
impl Unpin for SlipError
impl !UnwindSafe for SlipError
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