#[non_exhaustive]
pub enum Error {
Exhausted,
Illegal,
Unaddressable,
Finished,
Truncated,
Checksum,
Unrecognized,
Fragmented,
Malformed,
Dropped,
NotSupported,
}
Expand description
The error type for the networking stack.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Exhausted
An operation cannot proceed because a buffer is empty or full.
Illegal
An operation is not permitted in the current state.
Unaddressable
An endpoint or address of a remote host could not be translated to a lower level address. E.g. there was no an Ethernet address corresponding to an IPv4 address in the ARP cache, or a TCP connection attempt was made to an unspecified endpoint.
Finished
The operation is finished. E.g. when reading from a TCP socket, there’s no more data to read because the remote has closed the connection.
Truncated
An incoming packet could not be parsed because some of its fields were out of bounds of the received data.
Checksum
An incoming packet had an incorrect checksum and was dropped.
Unrecognized
An incoming packet could not be recognized and was dropped. E.g. an Ethernet packet with an unknown EtherType.
Fragmented
An incoming IP packet has been split into several IP fragments and was dropped, since IP reassembly is not supported.
Malformed
An incoming packet was recognized but was self-contradictory. E.g. a TCP packet with both SYN and FIN flags set.
Dropped
An incoming packet was recognized but contradicted internal state. E.g. a TCP packet addressed to a socket that doesn’t exist.
NotSupported
An incoming packet was recognized but some parts are not supported by smoltcp. E.g. some bit configuration in a packet header is not supported, but is defined in an RFC.
Trait Implementations
impl Copy for Error
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more