pub enum VerificationStatus {
Verified,
Unverified,
Failed,
}Expand description
Verification status for entries in the backend.
This enum tracks whether an entry has been cryptographically verified by the higher-level authentication system. The backend stores this status but does not perform verification itself - that’s handled by the Database/Transaction layers.
Only the local validation pass (Transaction) may assign Verified: it
is the sole code path that has actually checked the entry’s signature and
permissions. Anything arriving from outside this node — over the sync
protocol or the service wire — enters as Unverified and can only be
promoted later by a local re-verification pass. A peer cannot assert
Verified for us; the wire carries no verification status.
Variants§
Verified
Entry has been cryptographically verified as authentic by this node’s local validation pass. The default for locally created and signed entries; never assignable from off-node input.
Unverified
Entry has not yet been verified by this node — received before
verification could complete (e.g. a delegated/_settings tree it
depends on has not arrived yet). Transient and promotable: a future
re-verification pass moves it to Verified once its pinned
settings-ancestor set is present. Admitted into state, flagged.
Failed
Entry was checked and definitively failed verification — invalid signature, revoked key, etc. Terminal; never promoted.
Implementations§
Source§impl VerificationStatus
impl VerificationStatus
Sourcepub fn as_db_int(self) -> i64
pub fn as_db_int(self) -> i64
Canonical persistence encoding. The single source of truth for the
integer stored in the verification_status column; all backends use
this rather than open-coding the mapping.
Sourcepub fn from_db_int(code: i64) -> Result<Self>
pub fn from_db_int(code: i64) -> Result<Self>
Inverse of as_db_int. Errors on an unknown code
instead of silently collapsing it to Failed — a stray value means
storage corruption, not a failed verification.
This codec is intentionally additively extensible: a future state
(e.g. a peer-attested Trusted) takes a fresh, never-reused integer.
Old data keeps decoding; an old reader rejects the new code rather
than misinterpreting it; and the wire carries no status at all, so
adding a state is not a protocol change. Source-level it is
deliberately not non-breaking — the match arms here and on
VerificationStatus elsewhere are exhaustive so the compiler
enumerates every site that must consciously handle the new state.
Trait Implementations§
Source§impl Clone for VerificationStatus
impl Clone for VerificationStatus
Source§fn clone(&self) -> VerificationStatus
fn clone(&self) -> VerificationStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerificationStatus
impl Debug for VerificationStatus
Source§impl Default for VerificationStatus
impl Default for VerificationStatus
Source§fn default() -> VerificationStatus
fn default() -> VerificationStatus
Source§impl<'de> Deserialize<'de> for VerificationStatus
impl<'de> Deserialize<'de> for VerificationStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for VerificationStatus
impl Hash for VerificationStatus
Source§impl PartialEq for VerificationStatus
impl PartialEq for VerificationStatus
Source§impl Serialize for VerificationStatus
impl Serialize for VerificationStatus
impl Copy for VerificationStatus
impl Eq for VerificationStatus
impl StructuralPartialEq for VerificationStatus
Auto Trait Implementations§
impl Freeze for VerificationStatus
impl RefUnwindSafe for VerificationStatus
impl Send for VerificationStatus
impl Sync for VerificationStatus
impl Unpin for VerificationStatus
impl UnsafeUnpin for VerificationStatus
impl UnwindSafe for VerificationStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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