pub enum GateError {
ClaimedId(Error),
Canon(Error),
Hash {
claimed: String,
computed: String,
},
Sig(Error),
}Expand description
Which gate of the verify_genesis_capsule pipeline rejected the input.
The variants are ordered as the pipeline evaluates them; each names the gate so a caller (or audit record) can distinguish “these bytes are malformed” from “these bytes are not the capsule you asked for” from “these bytes are the right shape and identity but are not authentically signed”.
Variants§
ClaimedId(Error)
The claimed identifier was not a well-formed at9p cid512
(did:at9p:<cid512>): wrong multibase, wrong multicodec, or not a
BLAKE3-512 multihash. Checked before any capsule bytes are examined so
the hash-gate always compares against a real cid512.
Canon(Error)
canon-gate (R3/A16): the bytes did not decode as a canonical,
schema-valid capsule — either the DAG-CBOR was malformed, non-canonical
(reserialize(decode(bytes)) != bytes), or violated a capsule schema
invariant.
Hash
hash-gate (A1/A16): BLAKE3-512(canonical bytes) did not equal the
claimed cid512. The bytes are a well-formed capsule, but not the one
this identity names.
Fields
Sig(Error)
sig-gate (§4.4/R4/A19): composite verification failed under pinned Hybrid — a missing/invalid EdDSA or ML-DSA-65 layer, a context-string mismatch, or a signature that does not verify against the capsule’s own primary subject key.
Trait Implementations§
Source§impl Error for GateError
impl Error for GateError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for GateError
impl RefUnwindSafe for GateError
impl Send for GateError
impl Sync for GateError
impl Unpin for GateError
impl UnsafeUnpin for GateError
impl UnwindSafe for GateError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more