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§
Source§impl Clone for TcpOptionReadError
impl Clone for TcpOptionReadError
Source§fn clone(&self) -> TcpOptionReadError
fn clone(&self) -> TcpOptionReadError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TcpOptionReadError
impl Debug for TcpOptionReadError
Source§impl Display for TcpOptionReadError
impl Display for TcpOptionReadError
Source§impl Error for TcpOptionReadError
impl Error for TcpOptionReadError
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 TcpOptionReadError
impl PartialEq for TcpOptionReadError
impl Eq for TcpOptionReadError
impl StructuralPartialEq for TcpOptionReadError
Auto Trait Implementations§
impl Freeze for TcpOptionReadError
impl RefUnwindSafe for TcpOptionReadError
impl Send for TcpOptionReadError
impl Sync for TcpOptionReadError
impl Unpin for TcpOptionReadError
impl UnwindSafe for TcpOptionReadError
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