Struct mutnet::error::LengthExceedsAvailableSpaceError
source · pub struct LengthExceedsAvailableSpaceError {
pub required_space: usize,
pub available_space: usize,
}
Expand description
Error returned by methods manipulating header field affecting the payload length.
Methods like setting the IPv6 payload length return this error if the supplied new length does not fit within the data buffer. For this, headroom is not considered available space as this would require copying the whole network data within the buffer.
Fields§
§required_space: usize
The required space in bytes.
available_space: usize
The space available in bytes.
Trait Implementations§
source§impl Clone for LengthExceedsAvailableSpaceError
impl Clone for LengthExceedsAvailableSpaceError
source§fn clone(&self) -> LengthExceedsAvailableSpaceError
fn clone(&self) -> LengthExceedsAvailableSpaceError
Returns a copy 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 Error for LengthExceedsAvailableSpaceError
impl Error for LengthExceedsAvailableSpaceError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 From<LengthExceedsAvailableSpaceError> for ParseIpv4Error
impl From<LengthExceedsAvailableSpaceError> for ParseIpv4Error
source§fn from(value: LengthExceedsAvailableSpaceError) -> Self
fn from(value: LengthExceedsAvailableSpaceError) -> Self
Converts to this type from the input type.
source§impl From<LengthExceedsAvailableSpaceError> for ParseIpv6Error
impl From<LengthExceedsAvailableSpaceError> for ParseIpv6Error
source§fn from(value: LengthExceedsAvailableSpaceError) -> Self
fn from(value: LengthExceedsAvailableSpaceError) -> Self
Converts to this type from the input type.
source§impl From<LengthExceedsAvailableSpaceError> for SetLengthError
impl From<LengthExceedsAvailableSpaceError> for SetLengthError
source§fn from(value: LengthExceedsAvailableSpaceError) -> Self
fn from(value: LengthExceedsAvailableSpaceError) -> Self
Converts to this type from the input type.
source§impl From<LengthExceedsAvailableSpaceError> for SetPayloadLengthError
impl From<LengthExceedsAvailableSpaceError> for SetPayloadLengthError
source§fn from(value: LengthExceedsAvailableSpaceError) -> Self
fn from(value: LengthExceedsAvailableSpaceError) -> Self
Converts to this type from the input type.
source§impl From<LengthExceedsAvailableSpaceError> for SetTotalLengthError
impl From<LengthExceedsAvailableSpaceError> for SetTotalLengthError
source§fn from(value: LengthExceedsAvailableSpaceError) -> Self
fn from(value: LengthExceedsAvailableSpaceError) -> Self
Converts to this type from the input type.
source§impl Ord for LengthExceedsAvailableSpaceError
impl Ord for LengthExceedsAvailableSpaceError
source§fn cmp(&self, other: &LengthExceedsAvailableSpaceError) -> Ordering
fn cmp(&self, other: &LengthExceedsAvailableSpaceError) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for LengthExceedsAvailableSpaceError
impl PartialEq for LengthExceedsAvailableSpaceError
source§fn eq(&self, other: &LengthExceedsAvailableSpaceError) -> bool
fn eq(&self, other: &LengthExceedsAvailableSpaceError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for LengthExceedsAvailableSpaceError
impl PartialOrd for LengthExceedsAvailableSpaceError
source§fn partial_cmp(
&self,
other: &LengthExceedsAvailableSpaceError
) -> Option<Ordering>
fn partial_cmp( &self, other: &LengthExceedsAvailableSpaceError ) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for LengthExceedsAvailableSpaceError
impl Eq for LengthExceedsAvailableSpaceError
impl StructuralPartialEq for LengthExceedsAvailableSpaceError
Auto Trait Implementations§
impl Freeze for LengthExceedsAvailableSpaceError
impl RefUnwindSafe for LengthExceedsAvailableSpaceError
impl Send for LengthExceedsAvailableSpaceError
impl Sync for LengthExceedsAvailableSpaceError
impl Unpin for LengthExceedsAvailableSpaceError
impl UnwindSafe for LengthExceedsAvailableSpaceError
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