Skip to main content

NetError

Enum NetError 

Source
pub enum NetError {
Show 43 variants AddrInUse, AlreadyConnected, AlreadyExists, BadState, BadAddress, BadFileDescriptor, BrokenPipe, ConnectionRefused, ConnectionReset, CrossesDevices, DirectoryNotEmpty, DestAddrRequired, FilesystemLoop, FileTooLarge, InProgress, Interrupted, InvalidInput, InvalidData, IsADirectory, MessageTooLong, NameTooLong, NoMemory, NoSuchDevice, NoSuchDeviceOrAddress, NotConnected, NotFound, NotADirectory, NotASocket, NotATty, OperationNotPermitted, OperationNotSupported, AddressFamilyUnsupported, ProtocolOptionUnsupported, PermissionDenied, ReadOnlyFilesystem, ResourceBusy, StorageFull, TimedOut, Unsupported, EntropyUnavailable, WouldBlock, Io(IoError), BackendIo,
}
Expand description

Errors owned by the network and socket domain.

Variants§

§

AddrInUse

The requested local address is already bound.

§

AlreadyConnected

The socket already has an established peer.

§

AlreadyExists

The requested network object already exists.

§

BadState

The network object cannot perform the operation in its current state.

§

BadAddress

A user or filesystem address used by the socket cannot be accessed.

§

BadFileDescriptor

A descriptor used by the network operation is invalid.

§

BrokenPipe

The peer has closed the write side of a stream.

§

ConnectionRefused

The destination rejected the connection attempt.

§

ConnectionReset

The peer reset an established connection.

§

CrossesDevices

A path-backed socket operation would cross filesystem devices.

§

DirectoryNotEmpty

A directory involved in a socket path operation is not empty.

§

DestAddrRequired

A datagram operation requires a destination address.

§

FilesystemLoop

Socket-path traversal encountered a filesystem loop.

§

FileTooLarge

A path-backed socket object exceeds the supported filesystem limit.

§

InProgress

A nonblocking connection attempt is still in progress.

§

Interrupted

The network operation was interrupted before completion.

§

InvalidInput

A socket address, option, or operation argument is invalid.

§

InvalidData

A path-backed socket object contains invalid filesystem data.

§

IsADirectory

A socket path unexpectedly refers to a directory.

§

MessageTooLong

The packet or message exceeds the transport limit.

§

NameTooLong

A socket path component exceeds the filesystem name limit.

§

NoMemory

Memory required by the network operation could not be allocated.

§

NoSuchDevice

The requested interface does not exist.

§

NoSuchDeviceOrAddress

No interface owns the address, or no route reaches the destination.

§

NotConnected

The socket has no connected peer.

§

NotFound

The requested network object was not found.

§

NotADirectory

A socket path component expected to be a directory is not one.

§

NotASocket

The selected object is not a socket.

§

NotATty

The selected socket object is not a terminal.

§

OperationNotPermitted

The caller is not permitted to change the requested network state.

§

OperationNotSupported

The socket or transport does not implement the requested operation.

§

AddressFamilyUnsupported

The address belongs to a family unsupported by this socket.

§

ProtocolOptionUnsupported

The socket does not recognize the requested protocol option.

§

PermissionDenied

Filesystem permissions deny access to a path-backed socket.

§

ReadOnlyFilesystem

A path-backed socket operation attempted to modify a read-only filesystem.

§

ResourceBusy

A queue or network resource is currently busy.

§

StorageFull

Storage used by a path-backed socket has no free space.

§

TimedOut

The network operation did not complete before its deadline.

§

Unsupported

The requested network capability is unavailable in this build.

§

EntropyUnavailable

A secured wireless connection cannot obtain trusted runtime entropy.

§

WouldBlock

The operation cannot complete without blocking.

§

Io(IoError)

A caller-provided I/O buffer failed while transferring packet data.

§

BackendIo

A network backend or path-backed namespace reported an I/O failure.

Trait Implementations§

Source§

impl Clone for NetError

Source§

fn clone(&self) -> NetError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for NetError

Source§

impl Debug for NetError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for NetError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for NetError

Source§

impl Error for NetError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<IoError> for NetError

Source§

fn from(source: IoError) -> Self

Converts to this type from the input type.
Source§

impl From<NetError> for IoError

Source§

fn from(error: NetError) -> Self

Converts to this type from the input type.
Source§

impl From<NetError> for NetworkRuntimeError

Source§

fn from(source: NetError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for NetError

Source§

fn eq(&self, other: &NetError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NetError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DmaPod for T
where T: Copy,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V