#[non_exhaustive]pub enum TransportError {
InvalidConfiguration(String),
InterfaceNotFound(String),
PermissionDenied,
Io(Error),
SendBufferFull,
FrameError(FrameError),
FdFrameOnNonFdBus,
PayloadExceedsBusCapacity {
len: u8,
max: u8,
},
ExtendedIdNotSupported,
}Expand description
Errors returned by transport operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidConfiguration(String)
The requested transport setup is contradictory or unsupported.
InterfaceNotFound(String)
The named interface does not exist on this host.
PermissionDenied
The caller lacks permission to open or operate the socket
(typically: missing CAP_NET_RAW).
Io(Error)
Generic IO error from the underlying syscall.
SendBufferFull
The kernel’s send buffer is full and remained full after the bounded retry budget was exhausted.
FrameError(FrameError)
A frame the codec produced was rejected before any IO was issued.
FdFrameOnNonFdBus
A CAN-FD frame was passed to a classical-only bus.
PayloadExceedsBusCapacity
The frame’s payload length exceeds the bus’s max payload length.
ExtendedIdNotSupported
The transport cannot send 29-bit extended IDs.
Trait Implementations§
Source§impl Debug for TransportError
impl Debug for TransportError
Source§impl Display for TransportError
impl Display for TransportError
Source§impl Error for TransportError
impl Error for TransportError
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<Error> for TransportError
impl From<Error> for TransportError
Source§impl From<FrameError> for TransportError
impl From<FrameError> for TransportError
Source§fn from(source: FrameError) -> Self
fn from(source: FrameError) -> Self
Converts to this type from the input type.
Source§impl From<TransportError> for Error
impl From<TransportError> for Error
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TransportError
impl !RefUnwindSafe for TransportError
impl Send for TransportError
impl Sync for TransportError
impl Unpin for TransportError
impl UnsafeUnpin for TransportError
impl !UnwindSafe for TransportError
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