Skip to main content

ClaimFrontiers

Struct ClaimFrontiers 

Source
pub struct ClaimFrontiers { /* private fields */ }
Expand description

Validated participant-keyed sequence and order claim authority.

Implementations§

Source§

impl ClaimFrontiers

Source

pub fn from_initial_enrollment<F>( operation: InitialEnrollmentOperationCommit<F>, attached_charge: ResourceVector, ) -> Result<InitialEnrollmentFrontierCommit<F>, Box<InitialEnrollmentFrontierFailure<F>>>

Constructs the complete initial frontier directly from one admitted enrollment operation and its exact encoded Attached charge.

No restore representation, row list, claim list, or numeric position is accepted from the caller. Participant zero, the retained lifecycle row, A/X, T/E, and L x T owners are derived solely from the opaque operation commit after its closure projection and aggregate ledgers are cross-checked.

§Errors

Returns InitialEnrollmentFrontierError when the supplied charge or any typed operation/projection invariant disagrees with the canonical initial frontier.

Source

pub fn restore( restore: ClaimFrontiersRestore, sequence_ledger: SequenceLedger, order_ledger: OrderLedger, ) -> Result<Self, ParticipantStateCorruptReason>

Restores exact frontiers only when their numeric unions, logical owners, product descriptors, DCR intervals, candidate keys, and aggregate ledgers all agree.

This standalone form accepts no compacted causal-history rows or binding origins. Snapshots containing either must use the protocol-owned event replay path so participant-owned history is restored first.

§Errors

Returns the deterministic first delivery-sequence fault before checking transaction order, then checks cross-counter candidate and DCR identity.

Source

pub const fn active_identities(&self) -> &ActiveIdentityRanks

Borrows sorted current live identities.

Source

pub const fn identity_slot_limit(&self) -> u64

Returns the signed permanent identity-slot capacity validated at restore.

Source

pub const fn conversation_id(&self) -> ConversationId

Returns the owning conversation.

Source

pub const fn retained_floor(&self) -> u128

Returns the current physical retained suffix floor.

Source

pub fn retained_records(&self) -> &[RetainedCausalRecord]

Borrows every validated physical row in the retained sequence suffix.

Source

pub fn retained_marker_records(&self) -> &[RetainedCausalRecord]

Borrows only the O(I) retained marker anchors needed by executable edges.

Source

pub fn project_offered_marker_progress( &self, participant_id: ParticipantId, binding_epoch: BindingEpoch, marker_delivery_seq: DeliverySeq, event: Event, ) -> Option<ParticipantCursorProgress>

Projects exact offered-marker cursor progress from one validated retained marker and its current bound identity.

Raw participant, epoch, and sequence inputs grant no authority: all must match the coupled frontier’s retained marker anchor and active binding. The returned progress is derived only through sealed MarkerDelivery authority and the exact delivered event.

Source

pub const fn sequence(&self) -> &SequenceClaimFrontier

Borrows the validated sequence frontier.

Source

pub const fn order(&self) -> &OrderClaimFrontier

Borrows the validated transaction-order frontier.

Source

pub fn project_ordinary_record( self, input: OrdinaryRecordProjectionInput, ) -> Result<OrdinaryRecordProjectionDecision, Box<OrdinaryRecordProjectionFailure>>

Consumes one complete validated frontier into the ordinary record fixed point, preventing storage callers from supplying disconnected retained rows, participant cursors, immutable candidates, or aggregate ledgers.

Exact keyed row charges remain durability facts. They are joined to the owned rows here before any floor/capacity/counter transition executes. The returned decision owns either the unchanged prestate and its exact earlier candidate, or the complete projected poststate.

§Errors

Returns OrdinaryRecordProjectionFailure for a conversation/binding mismatch, malformed keyed charges/accounting, capacity or observer refusal, counter exhaustion, or an impossible exact-owner relocation. Every failure owns the unchanged frontier and original projection input.

Source

pub fn planned_settled_leave_admission_order<F>( &self, member: &LiveMember<F>, binding_state: BindingState, ) -> Result<AdmissionOrder, PrepareLeaveAuthorityError>

Returns the exact causal key a settled bound/detached Leave would consume without relinquishing frontier authority.

This planning view exists so a durable binding can compute the canonical keyed Left row charge before calling the consuming commit. The consuming preparation reruns the same validation.

§Errors

Returns PrepareLeaveAuthorityError under the same preconditions as Self::prepare_settled_leave_authority.

Source

pub fn prepare_settled_leave_authority<F>( self, member: &LiveMember<F>, binding_state: BindingState, ) -> Result<PreparedLeaveAuthority, PrepareLeaveAuthorityError>

Consumes the exact settled bound/detached X authority and relays the surviving order lane behind the selected Left major.

Bound Leave also invalidates the same participant’s exact A handle. Every immutable candidate must already have drained. The returned authority owns this frontier snapshot and is intentionally non-cloneable; only super::commit_leave can consume it.

§Errors

Returns PrepareLeaveAuthorityError when identity/binding authority, candidate precedence, a logical handle, or checked relay capacity fails.

Source

pub fn planned_pending_leave_admission_order<F>( &self, member: &LiveMember<F>, pending: PendingFinalization, ) -> Result<AdmissionOrder, PrepareLeaveAuthorityError>

Returns the exact causal key a pending-terminal Leave would consume after its immutable terminal, without relinquishing frontier authority.

§Errors

Returns PrepareLeaveAuthorityError under the same preconditions as Self::prepare_pending_leave_authority.

Source

pub fn prepare_pending_leave_authority<F>( self, member: &LiveMember<F>, pending: PendingFinalization, ) -> Result<PreparedLeaveAuthority, PrepareLeaveAuthorityError>

Consumes the exact pending-terminal plus X positional order authority.

The pending terminal must be the sole immutable candidate, must match the detached identity’s exact prior epoch, and must lie strictly before the participant’s X handle. The returned non-cloneable authority owns the relayed frontier snapshot and can be consumed only by super::commit_pending_leave.

§Errors

Returns PrepareLeaveAuthorityError for mismatched identity/binding, any unrelated candidate, absent logical ownership, or insufficient checked suffix for the later-handle relocation.

Trait Implementations§

Source§

impl Debug for ClaimFrontiers

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ClaimFrontiers

Source§

impl PartialEq for ClaimFrontiers

Source§

fn eq(&self, other: &ClaimFrontiers) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ClaimFrontiers

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.