Enum etherparse::TcpOptionWriteError
source · [−]pub enum TcpOptionWriteError {
NotEnoughSpace(usize),
}
Expand description
Errors that can occour when setting the options of a tcp header.
Variants
NotEnoughSpace(usize)
There is not enough memory to store all options in the options section of the header (maximum 40 bytes).
The options size is limited by the 4 bit data_offset field in the header which describes the total tcp header size in multiple of 4 bytes. This leads to a maximum size for the options part of the header of 4*(15 - 5) (minus 5 for the size of the tcp header itself).
Trait Implementations
sourceimpl Clone for TcpOptionWriteError
impl Clone for TcpOptionWriteError
sourcefn clone(&self) -> TcpOptionWriteError
fn clone(&self) -> TcpOptionWriteError
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 TcpOptionWriteError
impl Debug for TcpOptionWriteError
sourceimpl Display for TcpOptionWriteError
impl Display for TcpOptionWriteError
sourceimpl Error for TcpOptionWriteError
impl Error for TcpOptionWriteError
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<TcpOptionWriteError> for TcpOptionWriteError
impl PartialEq<TcpOptionWriteError> for TcpOptionWriteError
sourcefn eq(&self, other: &TcpOptionWriteError) -> bool
fn eq(&self, other: &TcpOptionWriteError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TcpOptionWriteError) -> bool
fn ne(&self, other: &TcpOptionWriteError) -> bool
This method tests for !=
.
impl Eq for TcpOptionWriteError
impl StructuralEq for TcpOptionWriteError
impl StructuralPartialEq for TcpOptionWriteError
Auto Trait Implementations
impl RefUnwindSafe for TcpOptionWriteError
impl Send for TcpOptionWriteError
impl Sync for TcpOptionWriteError
impl Unpin for TcpOptionWriteError
impl UnwindSafe for TcpOptionWriteError
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