pub enum DxError {
InvalidPrefix,
InvalidLength,
InvalidCharacter(char),
Utf8Error(String),
ChecksumMismatch {
expected: u16,
actual: u16,
},
InvalidHeader,
}Expand description
DX 编码错误类型
Variants§
InvalidPrefix
缺少 dx 前缀
InvalidLength
长度不正确
InvalidCharacter(char)
包含非法字符
Utf8Error(String)
UTF-8 解码错误
ChecksumMismatch
校验和不匹配
InvalidHeader
头部无效
Trait Implementations§
Source§impl Error for DxError
impl Error for DxError
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()
impl Eq for DxError
impl StructuralPartialEq for DxError
Auto Trait Implementations§
impl Freeze for DxError
impl RefUnwindSafe for DxError
impl Send for DxError
impl Sync for DxError
impl Unpin for DxError
impl UnsafeUnpin for DxError
impl UnwindSafe for DxError
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