pub struct Membership { /* private fields */ }Expand description
A chain derived exclusively from verified signed predecessors. No server observation or resulting-state DTO can construct this value directly.
Implementations§
Source§impl Membership
impl Membership
Sourcepub fn verify_initial_key(
&self,
key: &LocalSharedStatePackageKey,
) -> Result<VerifiedKeys>
pub fn verify_initial_key( &self, key: &LocalSharedStatePackageKey, ) -> Result<VerifiedKeys>
Initial-generation-only construction for existing protected seed authority.
Source§impl Membership
impl Membership
pub fn from_publication( genesis: &Genesis, descriptor: &[u8], publication: &[u8], ) -> Result<Self>
pub fn head(&self) -> [u8; 32]
pub fn sequence(&self) -> u64
pub fn has_device(&self, device: [u8; 32]) -> bool
pub fn devices(&self) -> impl Iterator<Item = [u8; 32]> + '_
Sourcepub fn admissions(&self) -> impl Iterator<Item = ([u8; 32], u64)> + '_
pub fn admissions(&self) -> impl Iterator<Item = ([u8; 32], u64)> + '_
Active devices with the membership sequence that admitted each; the device that set up sync has sequence 0.
Sourcepub fn has_admission(&self, handle: [u8; 32]) -> bool
pub fn has_admission(&self, handle: [u8; 32]) -> bool
Whether an active member owns this admitted invitation.
Sourcepub fn record_action(record: &[u8]) -> Result<([u8; 32], u8)>
pub fn record_action(record: &[u8]) -> Result<([u8; 32], u8)>
Signer and action framing, not signature or successor verification.
pub fn device_count(&self) -> usize
pub fn genesis(&self) -> &Genesis
pub fn publication(&self) -> &Publication
Sourcepub fn extends(&self, previous: &Self) -> bool
pub fn extends(&self, previous: &Self) -> bool
Ancestry, not a claim that either checkpoint is the latest server head.
Sourcepub fn authenticate(
&self,
auth: &Authentication<'_>,
ancestor: bool,
) -> Result<()>
pub fn authenticate( &self, auth: &Authentication<'_>, ancestor: bool, ) -> Result<()>
Authenticate the actual credential before examining its requested head.
pub fn head_at(&self, sequence: u64) -> Option<[u8; 32]>
pub fn validate_key(&self, key: &LocalSharedStatePackageKey) -> Result<()>
pub fn contains_head(&self, head: &[u8; 32]) -> bool
Sourcepub fn append(
&self,
declaration: &[u8],
request: &[u8],
record: &[u8],
) -> Result<Self>
pub fn append( &self, declaration: &[u8], request: &[u8], record: &[u8], ) -> Result<Self>
Validate one exact successor without mutating the trusted predecessor. Expiry, current bearer authorization and atomic server CAS are separate.
Sourcepub fn ensure_change_capacity(&self) -> Result<()>
pub fn ensure_change_capacity(&self) -> Result<()>
Room for the costlier outcome of an invitation: withdrawing it with a freeze and key rotation, which also covers admitting its device.