#[non_exhaustive]pub enum CommitmentError {
AmountTooLarge,
FieldTooLong(usize),
Truncated(usize),
TrailingBytes(usize),
UnknownVersion(u8),
UnknownTag {
field: &'static str,
value: u8,
},
}Expand description
Errors encoding or decoding the public-commitment journal.
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.
AmountTooLarge
The amount did not fit in the fixed 256-bit journal field.
FieldTooLong(usize)
A length-prefixed field exceeded the journal’s 16-bit size limit.
Truncated(usize)
The journal ended before a field could be fully read.
TrailingBytes(usize)
The journal carried unexpected bytes past its declared fields.
UnknownVersion(u8)
The journal’s leading version byte is not a layout this build understands.
UnknownTag
An enum discriminant in the journal did not map to a known variant.
Trait Implementations§
Source§impl Debug for CommitmentError
impl Debug for CommitmentError
Source§impl Display for CommitmentError
impl Display for CommitmentError
Source§impl Error for CommitmentError
impl Error for CommitmentError
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()
Auto Trait Implementations§
impl Freeze for CommitmentError
impl RefUnwindSafe for CommitmentError
impl Send for CommitmentError
impl Sync for CommitmentError
impl Unpin for CommitmentError
impl UnsafeUnpin for CommitmentError
impl UnwindSafe for CommitmentError
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