pub enum AuthorityTier {
Derived,
Candidate,
Agent,
User,
}Expand description
Trust-tier ranking used to fold an authority label across N sources.
The compressor cannot launder authority upward: the produced summary’s
authority tier equals the LOWEST tier among the sources. The string
representation written to the durable row is the lowest source’s
authority string verbatim — that is, if all sources are "candidate"
then the produced summary is "candidate", even if the trust rank
would notionally permit a higher label.
Variants§
Derived
Derived, tool, runtime, external, missing, or failed-verify source. Lowest trust.
Candidate
Candidate-tier memory (not yet accepted).
Agent
Verified agent-authored source.
User
Verified user / manual-correction source. Highest trust.
Implementations§
Source§impl AuthorityTier
impl AuthorityTier
Sourcepub const fn trust_rank(self) -> u8
pub const fn trust_rank(self) -> u8
Integer trust rank: lower is less trusted.
Sourcepub fn parse_lenient(authority: &str) -> Self
pub fn parse_lenient(authority: &str) -> Self
Best-effort parse of a stored authority string into a tier rank.
Unknown values are conservatively classified as the lowest tier
(AuthorityTier::Derived) so an unfamiliar label cannot
accidentally launder a compression upward.
Trait Implementations§
Source§impl Clone for AuthorityTier
impl Clone for AuthorityTier
Source§fn clone(&self) -> AuthorityTier
fn clone(&self) -> AuthorityTier
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthorityTier
impl Debug for AuthorityTier
Source§impl Ord for AuthorityTier
impl Ord for AuthorityTier
Source§fn cmp(&self, other: &AuthorityTier) -> Ordering
fn cmp(&self, other: &AuthorityTier) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AuthorityTier
impl PartialEq for AuthorityTier
Source§fn eq(&self, other: &AuthorityTier) -> bool
fn eq(&self, other: &AuthorityTier) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AuthorityTier
impl PartialOrd for AuthorityTier
impl Copy for AuthorityTier
impl Eq for AuthorityTier
impl StructuralPartialEq for AuthorityTier
Auto Trait Implementations§
impl Freeze for AuthorityTier
impl RefUnwindSafe for AuthorityTier
impl Send for AuthorityTier
impl Sync for AuthorityTier
impl Unpin for AuthorityTier
impl UnsafeUnpin for AuthorityTier
impl UnwindSafe for AuthorityTier
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.