#[non_exhaustive]pub enum ReceiptError {
Jcs(JcsError),
Serde(Error),
Key(KeyError),
Base64,
KeyMismatch(String),
DuplicateKey(String),
SemanticInvariant(String),
}Expand description
Receipt errors.
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.
Jcs(JcsError)
Canonicalization failed (unsafe numbers in body).
Serde(Error)
Serialization failed.
Key(KeyError)
Key/signature failure.
Base64
Signature or public key not valid base64.
KeyMismatch(String)
The receipt’s embedded public key does not match the keyring entry for its key id (substitution attempt).
DuplicateKey(String)
Round-15 F4: a JSON object at some nesting level carried a duplicate key. Rejecting these closes the last-wins vs first-wins auditor split-brain that would otherwise let a hostile issuer sign under one interpretation while an external audit tool displayed the other.
SemanticInvariant(String)
Round-16 F8: a receipt carries a semantically-invalid field
(currently: AtifTrajectory.retroactive == false). Distinct
from Serde and DuplicateKey so ops triage can name the
class.
Trait Implementations§
Source§impl Debug for ReceiptError
impl Debug for ReceiptError
Source§impl Display for ReceiptError
impl Display for ReceiptError
Source§impl Error for ReceiptError
impl Error for ReceiptError
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<Error> for ReceiptError
impl From<Error> for ReceiptError
Source§impl From<JcsError> for ReceiptError
impl From<JcsError> for ReceiptError
Auto Trait Implementations§
impl Freeze for ReceiptError
impl !RefUnwindSafe for ReceiptError
impl Send for ReceiptError
impl Sync for ReceiptError
impl Unpin for ReceiptError
impl UnsafeUnpin for ReceiptError
impl !UnwindSafe for ReceiptError
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