pub struct OrgRevocationState { /* private fields */ }Expand description
Merged revocation-floor maxima: for each (org, member), the
highest minimum_generation any verified bundle has ever
asserted on this node. Monotone: a merge can only raise floors.
Implementations§
Source§impl OrgRevocationState
impl OrgRevocationState
Sourcepub fn floor_for(&self, org: &OrgId, member: &EntityId) -> u32
pub fn floor_for(&self, org: &OrgId, member: &EntityId) -> u32
The current floor for (org, member). Absent keys floor at
0 — every generation is admissible until a bundle says
otherwise.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&(OrgId, EntityId), &u32)>
pub fn iter(&self) -> impl Iterator<Item = (&(OrgId, EntityId), &u32)>
Iterate floors in canonical (org, member) order.
Sourcepub fn merge_bundle(&mut self, bundle: &OrgRevocationBundle) -> usize
pub fn merge_bundle(&mut self, bundle: &OrgRevocationBundle) -> usize
Monotone merge: raise each (bundle.org_id, member) floor
to the bundle’s value where higher; lower values never win.
Returns how many floors rose.
Does NOT verify the bundle — the caller does (the store’s locked order verifies before merging; state-level callers such as tests must do the same).
Sourcepub fn load_if_exists(path: &Path) -> Result<Option<Self>, OrgRevocationError>
pub fn load_if_exists(path: &Path) -> Result<Option<Self>, OrgRevocationError>
Strict read of a persisted state file that may not exist
yet: Ok(None) when absent, loud typed errors on anything
unparseable. The adoption ceremony uses this to validate
candidate floors BEFORE creating any durable state
(review-8 §7/§8).
Trait Implementations§
Source§impl Clone for OrgRevocationState
impl Clone for OrgRevocationState
Source§fn clone(&self) -> OrgRevocationState
fn clone(&self) -> OrgRevocationState
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 OrgRevocationState
impl Debug for OrgRevocationState
Source§impl Default for OrgRevocationState
impl Default for OrgRevocationState
Source§fn default() -> OrgRevocationState
fn default() -> OrgRevocationState
impl Eq for OrgRevocationState
Source§impl PartialEq for OrgRevocationState
impl PartialEq for OrgRevocationState
impl StructuralPartialEq for OrgRevocationState
Auto Trait Implementations§
impl Freeze for OrgRevocationState
impl RefUnwindSafe for OrgRevocationState
impl Send for OrgRevocationState
impl Sync for OrgRevocationState
impl Unpin for OrgRevocationState
impl UnsafeUnpin for OrgRevocationState
impl UnwindSafe for OrgRevocationState
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> 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.