#[non_exhaustive]pub enum AdmissionError {
Successor(SuccessorError),
Duplicity(Box<DuplicityAlarm>),
FrozenIdentity {
epoch: u64,
},
NotSeeded {
subject_cid512: String,
},
AlreadySeeded {
subject_cid512: String,
existing_epoch: u64,
},
AcceptedHeadNotFresh(Error),
Store(Error),
MalformedPredecessor(Error),
}Expand description
Why an admission failed. Every variant fails closed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Successor(SuccessorError)
B1’s validate_successor rejected the candidate against the supplied
predecessor — it is not an authorized successor at all (propagated
unchanged so callers can match the specific gate).
Duplicity(Box<DuplicityAlarm>)
Duplicity: the candidate is individually B1-valid but diverges from the
persisted watermark. Fail-closed; the DuplicityAlarm has already been
raised on the sink. Boxed to keep the happy-path Result small.
FrozenIdentity
The identity’s watermark is terminal (declared-immutable or exhausted, B3 #887): no successor is admissible, by design. B1 is not even consulted.
NotSeeded
The guard was asked to admit a successor for a DID it has never seen (no
seeded watermark). Callers must DuplicityGuard::seed_genesis from a
GATE-verified genesis capsule first; admitting against an unknown baseline
is refused fail-closed rather than trusting an unanchored predecessor.
AlreadySeeded
The watermark for this DID already exists and must not be re-seeded
(anti-rollback, FIX in #959): seed_genesis refuses to overwrite an
already-advanced (epoch > 0) or different-genesis anchor so a stray /
hostile re-seed cannot roll the anchor backward.
Fields
AcceptedHeadNotFresh(Error)
The durable accepted predecessor is an update whose validity window has elapsed. An expired head cannot authorize a later rotation.
Store(Error)
The underlying WatermarkStore failed (I/O, poisoned lock). Fail-closed:
a watermark that cannot be read or written is treated as blocking, never
bypassed.
MalformedPredecessor(Error)
The presented predecessor record was anchored (its H512 matches the
watermark) but could not be projected to a ChainState — e.g. a
genesis capsule whose cid512 does not parse. An anchored record that
nonetheless fails to decode is an internal inconsistency; fail-closed
rather than trust a partially-derived state.
Trait Implementations§
Source§impl Debug for AdmissionError
impl Debug for AdmissionError
Source§impl Display for AdmissionError
impl Display for AdmissionError
Source§impl Error for AdmissionError
impl Error for AdmissionError
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 AdmissionError
impl RefUnwindSafe for AdmissionError
impl Send for AdmissionError
impl Sync for AdmissionError
impl Unpin for AdmissionError
impl UnsafeUnpin for AdmissionError
impl UnwindSafe for AdmissionError
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