pub enum RouterError<T, P> {
Msg(MsgError),
Io(ErrorKind),
De(DeError),
Socket(SocketError),
Nlmsgerr(Nlmsgerr<NlmsghdrErr<T, P>>),
BadSeqOrPid(Nlmsghdr<T, P>),
NoAck,
UnexpectedAck,
ClosedChannel,
}
Expand description
Sendable, clonable error that can be sent across channels in the router infrastructure to provide typed errors to all receivers indicating what went wrong.
Variants§
Msg(MsgError)
Arbitrary message
Io(ErrorKind)
errno indicating what went wrong in an IO error.
De(DeError)
Deserialization error.
Socket(SocketError)
Error from socket infrastructure.
Nlmsgerr(Nlmsgerr<NlmsghdrErr<T, P>>)
An error packet sent back by netlink.
BadSeqOrPid(Nlmsghdr<T, P>)
A bad sequence number or PID was received.
NoAck
No ack was received when
NlmF::Ack
was specified in the
request.
UnexpectedAck
An ack was received when
NlmF::Ack
was not specified in the
request.
ClosedChannel
A channel has closed and message processing cannot continue.
Implementations§
Source§impl<T, P> RouterError<T, P>
impl<T, P> RouterError<T, P>
Source§impl RouterError<u16, Buffer>
impl RouterError<u16, Buffer>
Sourcepub fn to_typed<T, P>(self) -> Result<RouterError<T, P>, RouterError<T, P>>
pub fn to_typed<T, P>(self) -> Result<RouterError<T, P>, RouterError<T, P>>
Convert to typed router error from a router error that can represent all types.
Trait Implementations§
Source§impl<T: Clone, P: Clone> Clone for RouterError<T, P>
impl<T: Clone, P: Clone> Clone for RouterError<T, P>
Source§fn clone(&self) -> RouterError<T, P>
fn clone(&self) -> RouterError<T, P>
Returns a duplicate 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<T, P> Display for RouterError<T, P>
impl<T, P> Display for RouterError<T, P>
Source§impl<T, P> Error for RouterError<T, P>
impl<T, P> Error for RouterError<T, P>
1.30.0 · 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<T, P> From<DeError> for RouterError<T, P>
impl<T, P> From<DeError> for RouterError<T, P>
Source§impl<E, T, P> From<E> for RouterError<T, P>where
BuilderError: From<E>,
impl<E, T, P> From<E> for RouterError<T, P>where
BuilderError: From<E>,
Source§impl<T, P> From<MsgError> for RouterError<T, P>
impl<T, P> From<MsgError> for RouterError<T, P>
Source§impl<T, P> From<SocketError> for RouterError<T, P>
impl<T, P> From<SocketError> for RouterError<T, P>
Source§fn from(e: SocketError) -> Self
fn from(e: SocketError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T, P> Freeze for RouterError<T, P>
impl<T, P> !RefUnwindSafe for RouterError<T, P>
impl<T, P> Send for RouterError<T, P>
impl<T, P> Sync for RouterError<T, P>
impl<T, P> Unpin for RouterError<T, P>
impl<T, P> !UnwindSafe for RouterError<T, P>
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