pub enum CanDeviceErrorKind {
Unknown,
NotFound,
NoDevice,
AccessDenied,
Busy,
UnsupportedConfig,
InvalidResponse,
InvalidFrame,
Backend,
}Expand description
设备/后端错误的结构化分类(不绑定具体后端实现)
Variants§
Unknown
NotFound
设备未找到/不存在(热拔插或枚举不到)
NoDevice
设备已断开
AccessDenied
权限不足/被拒绝
Busy
资源忙/被占用
UnsupportedConfig
不支持的波特率/配置
InvalidResponse
设备返回无效响应
InvalidFrame
解析到无效帧
Backend
其他 IO/后端错误
Trait Implementations§
Source§impl Clone for CanDeviceErrorKind
impl Clone for CanDeviceErrorKind
Source§fn clone(&self) -> CanDeviceErrorKind
fn clone(&self) -> CanDeviceErrorKind
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 Debug for CanDeviceErrorKind
impl Debug for CanDeviceErrorKind
Source§impl PartialEq for CanDeviceErrorKind
impl PartialEq for CanDeviceErrorKind
impl Copy for CanDeviceErrorKind
impl Eq for CanDeviceErrorKind
impl StructuralPartialEq for CanDeviceErrorKind
Auto Trait Implementations§
impl Freeze for CanDeviceErrorKind
impl RefUnwindSafe for CanDeviceErrorKind
impl Send for CanDeviceErrorKind
impl Sync for CanDeviceErrorKind
impl Unpin for CanDeviceErrorKind
impl UnwindSafe for CanDeviceErrorKind
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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