Enum GuardCodecError
#[non_exhaustive]pub enum GuardCodecError {
Empty,
#[non_exhaustive] UnknownFormat {
found: u8,
},
Encode(PostcardError),
Decode(PostcardError),
#[non_exhaustive] TrailingBytes {
extra: usize,
},
}Expand description
Why a guard could not be stored or read back.
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.
Empty
The stored value has no bytes, not even the format byte.
#[non_exhaustive]UnknownFormat
The stored value is in a format this build does not read.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Encode(PostcardError)
The guard could not be encoded.
Decode(PostcardError)
The stored body is not a condition this build reads.
#[non_exhaustive]TrailingBytes
The stored body holds a condition and then bytes no condition owns.
Trait Implementations§
§impl Clone for GuardCodecError
impl Clone for GuardCodecError
§impl Debug for GuardCodecError
impl Debug for GuardCodecError
§impl Display for GuardCodecError
impl Display for GuardCodecError
impl Eq for GuardCodecError
§impl Error for GuardCodecError
impl Error for GuardCodecError
§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 PartialEq for GuardCodecError
impl PartialEq for GuardCodecError
impl StructuralPartialEq for GuardCodecError
Auto Trait Implementations§
impl Freeze for GuardCodecError
impl RefUnwindSafe for GuardCodecError
impl Send for GuardCodecError
impl Sync for GuardCodecError
impl Unpin for GuardCodecError
impl UnsafeUnpin for GuardCodecError
impl UnwindSafe for GuardCodecError
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