Enum etherparse::TcpOptionReadError
source · [−]pub enum TcpOptionReadError {
UnexpectedEndOfSlice {
option_id: u8,
expected_len: u8,
actual_len: usize,
},
UnexpectedSize {
option_id: u8,
size: u8,
},
UnknownId(u8),
}
Expand description
Errors that can occour while reading the options of a TCP header.
Variants
UnexpectedEndOfSlice
Returned if an option id was read, but there was not enough memory in the options left to completely read it.
UnexpectedSize
Returned if the option as an unexpected size argument (e.g. != 4 for maximum segment size).
UnknownId(u8)
Returned if an unknown tcp header option is encountered.
The first element is the identifier and the slice contains the rest of data left in the options.
Trait Implementations
sourceimpl Clone for TcpOptionReadError
impl Clone for TcpOptionReadError
sourcefn clone(&self) -> TcpOptionReadError
fn clone(&self) -> TcpOptionReadError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TcpOptionReadError
impl Debug for TcpOptionReadError
sourceimpl Display for TcpOptionReadError
impl Display for TcpOptionReadError
sourceimpl Error for TcpOptionReadError
impl Error for TcpOptionReadError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl PartialEq<TcpOptionReadError> for TcpOptionReadError
impl PartialEq<TcpOptionReadError> for TcpOptionReadError
sourcefn eq(&self, other: &TcpOptionReadError) -> bool
fn eq(&self, other: &TcpOptionReadError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TcpOptionReadError) -> bool
fn ne(&self, other: &TcpOptionReadError) -> bool
This method tests for !=
.
impl Eq for TcpOptionReadError
impl StructuralEq for TcpOptionReadError
impl StructuralPartialEq for TcpOptionReadError
Auto Trait Implementations
impl RefUnwindSafe for TcpOptionReadError
impl Send for TcpOptionReadError
impl Sync for TcpOptionReadError
impl Unpin for TcpOptionReadError
impl UnwindSafe for TcpOptionReadError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more