#[non_exhaustive]pub enum ClusterError {
Tlv(Error),
UnexpectedType {
context: &'static str,
},
MissingField(&'static str),
InvalidLength(&'static str),
}Expand description
Error returned by a generated attribute/command/struct decoder.
Deliberately has no InvalidEnumValue variant: unknown enum
discriminants decode to the enum’s Unknown(n) variant, never an error
(forward compatibility — a device on a newer spec revision must not break
our decode).
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.
Tlv(Error)
The underlying TLV codec rejected the bytes.
UnexpectedType
A TLV element had a type we did not expect for this field.
MissingField(&'static str)
A required struct/command field was absent.
InvalidLength(&'static str)
An integer or list length did not fit its declared Rust width.
Trait Implementations§
Source§impl Debug for ClusterError
impl Debug for ClusterError
Source§impl Display for ClusterError
impl Display for ClusterError
Source§impl Error for ClusterError
impl Error for ClusterError
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()
Auto Trait Implementations§
impl Freeze for ClusterError
impl RefUnwindSafe for ClusterError
impl Send for ClusterError
impl Sync for ClusterError
impl Unpin for ClusterError
impl UnsafeUnpin for ClusterError
impl UnwindSafe for ClusterError
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