#[non_exhaustive]pub enum SuccessorError {
SubjectMismatch {
expected: String,
found: String,
},
ImmutableIdentity,
NonMonotonicEpoch {
predecessor: u64,
candidate: u64,
},
BrokenLinkage,
SignerNotCommitted,
SignatureInvalid(Error),
Expired {
now: String,
expires_at: String,
},
Malformed(Error),
}Expand description
A typed successor-check failure. Every variant names the gate that failed; callers (and the B2 duplicity layer) can match on the specific reason.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SubjectMismatch
The candidate names a different identity than the predecessor
(subject_cid512 mismatch) — it is not part of this chain at all.
ImmutableIdentity
The predecessor pre-committed to no next keys: a declared-immutable identity (§7.1). Its chain is frozen at its current epoch and no update-record is ever a valid successor.
The richer immutable-identity semantics are owned by B3 (#887); this is only the fail-closed boundary the successor-check enforces.
NonMonotonicEpoch
Epoch did not strictly increase over the predecessor.
BrokenLinkage
prev_record_digest does not match the predecessor’s record digest — the
segment does not chain back to the accepted history.
SignerNotCommitted
The revealed signing key’s commitment digest is absent from the
predecessor’s next_key_commitments: the key was never pre-rotated, so
it is not authorized to rotate this identity.
SignatureInvalid(Error)
The pinned-Hybrid composite signature did not verify under the authorizing (pre-committed) key.
Expired
now >= expires_at: the record is stale (freshness gate, §7.2). now is
caller-supplied.
Malformed(Error)
The candidate record or a supplied timestamp was structurally malformed; fail-closed rather than guess.
Trait Implementations§
Source§impl Debug for SuccessorError
impl Debug for SuccessorError
Source§impl Display for SuccessorError
impl Display for SuccessorError
Source§impl Error for SuccessorError
impl Error for SuccessorError
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 SuccessorError
impl RefUnwindSafe for SuccessorError
impl Send for SuccessorError
impl Sync for SuccessorError
impl Unpin for SuccessorError
impl UnsafeUnpin for SuccessorError
impl UnwindSafe for SuccessorError
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