pub enum DriverError {
Can(CanError),
Protocol(ProtocolError),
ChannelClosed,
ChannelFull,
NotDualThread,
PoisonedLock,
IoThread(String),
NotImplemented(String),
Timeout,
InvalidInput(String),
}Expand description
驱动层错误类型
Variants§
Can(CanError)
CAN 驱动错误
Protocol(ProtocolError)
协议解析错误
ChannelClosed
命令通道已关闭(IO 线程退出)
ChannelFull
命令通道已满(缓冲区容量 10)
NotDualThread
未使用双线程模式
某些方法(如 send_realtime())只能在双线程模式下使用。
PoisonedLock
锁被毒化(线程 panic)
IoThread(String)
IO 线程错误
NotImplemented(String)
功能未实现
Timeout
操作超时
InvalidInput(String)
无效输入(如空帧包)
Trait Implementations§
Source§impl Debug for DriverError
impl Debug for DriverError
Source§impl Display for DriverError
impl Display for DriverError
Source§impl Error for DriverError
impl Error for DriverError
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<CanError> for DriverError
impl From<CanError> for DriverError
Source§impl From<ProtocolError> for DriverError
impl From<ProtocolError> for DriverError
Source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DriverError
impl !RefUnwindSafe for DriverError
impl Send for DriverError
impl Sync for DriverError
impl Unpin for DriverError
impl !UnwindSafe for DriverError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more