pub struct LatticeVersion(pub u32);Expand description
Monotonic lattice policy version. Crypto-agility / policy-agility rule
(design §14): the suite/lattice is pinned and versioned; migration is a
deliberate version bump, never an in-band negotiation. Labels and the
(UCAN, bundle_hash) approval (S5) bind this version so a label minted
under v1 can’t be silently reinterpreted under v2.
S1↔S4 reconciliation: this is the SAME monotonic counter that S4’s
compiled::CompiledPolicy.generation carries — a compiled TE matrix is valid
only against the lattice generation that minted its bit assignments. See
LatticeVersion::generation.
Tuple Fields§
§0: u32Implementations§
Source§impl LatticeVersion
impl LatticeVersion
Sourcepub const fn generation(self) -> u64
pub const fn generation(self) -> u64
The lattice version as the policy generation (S4’s CompiledPolicy
and AVC tag this same value). They are definitionally equal: a bump of
the compartment vocabulary IS a new policy generation.
Trait Implementations§
Source§impl Clone for LatticeVersion
impl Clone for LatticeVersion
Source§fn clone(&self) -> LatticeVersion
fn clone(&self) -> LatticeVersion
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 LatticeVersion
impl Debug for LatticeVersion
Source§impl<'de> Deserialize<'de> for LatticeVersion
impl<'de> Deserialize<'de> for LatticeVersion
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 Display for LatticeVersion
impl Display for LatticeVersion
Source§impl Hash for LatticeVersion
impl Hash for LatticeVersion
Source§impl Ord for LatticeVersion
impl Ord for LatticeVersion
Source§fn cmp(&self, other: &LatticeVersion) -> Ordering
fn cmp(&self, other: &LatticeVersion) -> 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 LatticeVersion
impl PartialEq for LatticeVersion
Source§fn eq(&self, other: &LatticeVersion) -> bool
fn eq(&self, other: &LatticeVersion) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for LatticeVersion
impl PartialOrd for LatticeVersion
Source§impl Serialize for LatticeVersion
impl Serialize for LatticeVersion
impl Copy for LatticeVersion
impl Eq for LatticeVersion
impl StructuralPartialEq for LatticeVersion
Auto Trait Implementations§
impl Freeze for LatticeVersion
impl RefUnwindSafe for LatticeVersion
impl Send for LatticeVersion
impl Sync for LatticeVersion
impl Unpin for LatticeVersion
impl UnsafeUnpin for LatticeVersion
impl UnwindSafe for LatticeVersion
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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