pub enum DecodeResponseNotificationError {
NotificationTooShort(NotificationTooShortError),
PieceStatus(PieceStatusError),
BatteryStatus(BatteryStatusError),
UnexpectedNotification(u8),
InvalidNotificationHeader {
offset: usize,
expected: u8,
actual: u8,
},
}Expand description
Reports why a command-response notification could not be decoded.
Variants§
NotificationTooShort(NotificationTooShortError)
The response ended before its required fields were available.
PieceStatus(PieceStatusError)
A tracked-piece response contained an invalid field.
BatteryStatus(BatteryStatusError)
A board battery response contained an invalid field.
UnexpectedNotification(u8)
The response type byte is not supported by this crate.
InvalidNotificationHeader
A fixed response-header byte did not match the protocol.
Trait Implementations§
Source§impl Clone for DecodeResponseNotificationError
impl Clone for DecodeResponseNotificationError
Source§fn clone(&self) -> DecodeResponseNotificationError
fn clone(&self) -> DecodeResponseNotificationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DecodeResponseNotificationError
impl Eq for DecodeResponseNotificationError
Source§impl Error for DecodeResponseNotificationError
impl Error for DecodeResponseNotificationError
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<BatteryStatusError> for DecodeResponseNotificationError
impl From<BatteryStatusError> for DecodeResponseNotificationError
Source§fn from(source: BatteryStatusError) -> Self
fn from(source: BatteryStatusError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeResponseNotificationError> for DecodeNotificationError
impl From<DecodeResponseNotificationError> for DecodeNotificationError
Source§fn from(source: DecodeResponseNotificationError) -> Self
fn from(source: DecodeResponseNotificationError) -> Self
Converts to this type from the input type.
Source§impl From<NotificationTooShortError> for DecodeResponseNotificationError
impl From<NotificationTooShortError> for DecodeResponseNotificationError
Source§fn from(source: NotificationTooShortError) -> Self
fn from(source: NotificationTooShortError) -> Self
Converts to this type from the input type.
Source§impl From<PieceStatusError> for DecodeResponseNotificationError
impl From<PieceStatusError> for DecodeResponseNotificationError
Source§fn from(source: PieceStatusError) -> Self
fn from(source: PieceStatusError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for DecodeResponseNotificationError
Auto Trait Implementations§
impl Freeze for DecodeResponseNotificationError
impl RefUnwindSafe for DecodeResponseNotificationError
impl Send for DecodeResponseNotificationError
impl Sync for DecodeResponseNotificationError
impl Unpin for DecodeResponseNotificationError
impl UnsafeUnpin for DecodeResponseNotificationError
impl UnwindSafe for DecodeResponseNotificationError
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