pub enum Error {
Show 14 variants
OsError(Error),
UnsupportedSocketFamily(u32),
FailedToListProcesses(Error),
NotAValidSocket,
NotAValidFDType(u32),
FailedToQueryFileDescriptors(Error),
UnsupportedFileDescriptor,
FailedToAllocateBuffer,
FailedToGetTcpTable(i32),
FailedToGetUdpTable(i32),
NetLinkError,
NetLinkPacketError(ErrorMessage),
NetLinkPacketDecodeError(DecodeError),
UnknownProtocol(u8),
}Expand description
An enumeration of custom errors that might occur during system or network operations.
Variants§
OsError(Error)
Represents a generic OS-level error.
UnsupportedSocketFamily(u32)
Occurs when an unsupported socket family is specified.
FailedToListProcesses(Error)
Used when listing processes fails.
NotAValidSocket
Occurs when an invalid socket is specified.
NotAValidFDType(u32)
Used when an invalid proc_fdtype is specified.
FailedToQueryFileDescriptors(Error)
Used when querying file descriptors fails.
UnsupportedFileDescriptor
Occurs when an unsupported file descriptor is encountered.
FailedToAllocateBuffer
Used when buffer allocation fails.
FailedToGetTcpTable(i32)
Occurs when retrieving the TCP table fails.
FailedToGetUdpTable(i32)
Occurs when retrieving the UDP table fails.
NetLinkError
Represents a NetLink error.
NetLinkPacketError(ErrorMessage)
NetLinkPacketDecodeError(DecodeError)
UnknownProtocol(u8)
Used when an unknown protocol is found.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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