pub enum NlError<T = u16, P = Buffer> {
    Msg(String),
    Nlmsgerr(Nlmsgerr<T, P>),
    Ser(SerError),
    De(DeError),
    Wrapped(WrappedError),
    NoAck,
    BadSeq,
    BadPid,
}
Expand description

General netlink error

Variants§

§

Msg(String)

Variant for String-based messages.

§

Nlmsgerr(Nlmsgerr<T, P>)

An error packet sent back by netlink.

§

Ser(SerError)

A serialization error.

§

De(DeError)

A deserialization error.

§

Wrapped(WrappedError)

A wrapped error from lower in the call stack.

§

NoAck

No ack was received when NlmF::Ack was specified in the request.

§

BadSeq

The sequence number for the response did not match the request.

§

BadPid

Incorrect PID socket identifier in received message.

Implementations§

source§

impl NlError<u16, Buffer>

source

pub fn msg<D>(s: D) -> NlError<u16, Buffer>where D: Display,

Create new error from a data type implementing Display

source§

impl<T, P> NlError<T, P>

source

pub fn new<D>(s: D) -> NlError<T, P>where D: Display,

Create new error from a data type implementing Display

Trait Implementations§

source§

impl<T, P> Debug for NlError<T, P>where T: Debug, P: Debug,

source§

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

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

impl<T, P> Display for NlError<T, P>where T: Debug, P: Debug,

source§

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

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

impl<T, P> Error for NlError<T, P>where T: Debug, P: Debug,

1.30.0 · source§

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

👎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, demand: &mut Demand<'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<T, P> From<DeError> for NlError<T, P>

source§

fn from(err: DeError) -> NlError<T, P>

Converts to this type from the input type.
source§

impl<T, P> From<Error> for NlError<T, P>

source§

fn from(err: Error) -> NlError<T, P>

Converts to this type from the input type.
source§

impl From<FromBytesWithNulError> for NlError<u16, Buffer>

source§

fn from(e: FromBytesWithNulError) -> NlError<u16, Buffer>

Converts to this type from the input type.
source§

impl From<FromUtf8Error> for NlError<u16, Buffer>

source§

fn from(e: FromUtf8Error) -> NlError<u16, Buffer>

Converts to this type from the input type.
source§

impl From<NlError<u16, Buffer>> for ConnectError

source§

fn from(error: NlError) -> Self

Converts to this type from the input type.
source§

impl From<NlError<u16, Buffer>> for GetDeviceError

source§

fn from(error: NlError) -> Self

Converts to this type from the input type.
source§

impl From<NlError<u16, Buffer>> for LinkDeviceError

source§

fn from(error: NlError) -> Self

Converts to this type from the input type.
source§

impl From<NlError<u16, Buffer>> for ListDevicesError

source§

fn from(error: NlError) -> Self

Converts to this type from the input type.
source§

impl From<NlError<u16, Buffer>> for ParseDeviceError

source§

fn from(error: NlError) -> Self

Converts to this type from the input type.
source§

impl From<NlError<u16, Buffer>> for SetDeviceError

source§

fn from(error: NlError) -> Self

Converts to this type from the input type.
source§

impl<T, P> From<Nlmsgerr<T, P>> for NlError<T, P>

source§

fn from(err: Nlmsgerr<T, P>) -> NlError<T, P>

Converts to this type from the input type.
source§

impl<T, P> From<SerError> for NlError<T, P>

source§

fn from(err: SerError) -> NlError<T, P>

Converts to this type from the input type.
source§

impl From<Utf8Error> for NlError<u16, Buffer>

source§

fn from(e: Utf8Error) -> NlError<u16, Buffer>

Converts to this type from the input type.
source§

impl From<WrappedError> for NlError<u16, Buffer>

source§

fn from(e: WrappedError) -> NlError<u16, Buffer>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T = u16, P = Buffer> !RefUnwindSafe for NlError<T, P>

§

impl<T, P> Send for NlError<T, P>where P: Send, T: Send,

§

impl<T, P> Sync for NlError<T, P>where P: Sync, T: Sync,

§

impl<T, P> Unpin for NlError<T, P>where P: Unpin, T: Unpin,

§

impl<T = u16, P = Buffer> !UnwindSafe for NlError<T, P>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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<E> Provider for Ewhere E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
source§

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

source§

default fn to_string(&self) -> String

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

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.