Skip to main content

ParticipantCursorProgress

Enum ParticipantCursorProgress 

Source
pub enum ParticipantCursorProgress {
    Continuous(CursorProgressContinuous),
    Marker(CursorProgressMarker),
}
Expand description

Cursor progress split into typestates rather than an optional marker bag.

Continuous construction is crate-private so matching raw participant and epoch values cannot fabricate DetachedCursorRelease authority.

use liminal_protocol::{
    lifecycle::ParticipantCursorProgress,
    wire::BindingEpoch,
};

fn fabricate(epoch: BindingEpoch) {
    let _ = ParticipantCursorProgress::continuous(7, epoch, 11);
}

Variants§

§

Continuous(CursorProgressContinuous)

Continuous cursor witness.

§

Marker(CursorProgressMarker)

Exact marker acknowledgement witness, derivable only from delivery.

Implementations§

Source§

impl ParticipantCursorProgress

Source

pub const fn participant_id(self) -> ParticipantId

Returns the participant whose cursor is required.

Source

pub const fn binding_epoch(self) -> BindingEpoch

Returns the exact binding epoch.

Source

pub const fn through_seq(self) -> DeliverySeq

Returns the required cumulative boundary.

Source

pub const fn marker_delivery_seq(self) -> Option<DeliverySeq>

Returns the exact delivered marker when this is marker-backed.

Source§

impl ParticipantCursorProgress

Source

pub fn complete_ack( self, debt: ClosureDebt, event: Event, successor: DebtCompletion, ) -> Result<ClosureState, ClosureState>

Consumes an equal normal ack or exact marker ack and selects only clear/OP/PC.

§Errors

Returns the unchanged owed state unless the ack kind, participant, epoch, and boundary exactly satisfy this cursor witness.

Source

pub fn lesser_ack( self, debt: ClosureDebt, event: Event, resulting_debt: ClosureDebt, ) -> Result<ClosureState, ClosureState>

Consumes a lesser advancing normal ack and preserves this exact PCP.

§Errors

Returns the unchanged owed state unless the event is a matching current- epoch normal ack strictly below the stored boundary.

Source

pub fn clear_after_greater_ack( &self, event: &Event, ) -> Option<ProjectionCompactionSuccessor>

Validates clear selection for one greater cumulative normal ack.

Source

pub fn strict_after_greater_ack( &self, event: &Event, debt: ClosureDebt, edge: StoredEdge, successor_boundary: DeliverySeq, ) -> Option<ProjectionCompactionSuccessor>

Validates a strict non-DCR suffix for one greater cumulative normal ack.

Source

pub fn greater_ack( self, debt: ClosureDebt, event: Event, successor: ProjectionCompactionSuccessor, ) -> Result<ClosureState, ClosureState>

Consumes a greater cumulative normal ack and its predecessor-bound suffix.

§Errors

Returns the unchanged owed state unless the advancing event and strict successor authority are both bound to this cursor witness.

Source

pub const fn unchanged(self, debt: ClosureDebt) -> ClosureState

No-op, AckGap, and AckRegression consume no event and preserve exact PCP.

Source

pub const fn storage_progress( self, debt: ClosureDebt, event: Event, resulting_debt: Option<ClosureDebt>, ) -> Result<ClosureState, ClosureState>

Consumes independent projection/compaction completion and preserves PCP while debt remains, or clears it. Compaction cannot cross an unaccepted marker anchor.

§Errors

Returns the unchanged owed state for another event class or for a compaction that reaches an unaccepted marker.

Source

pub fn binding_fate( self, debt: ClosureDebt, event: Event, ) -> Result<CursorFateSuccessor, ClosureState>

Consumes exact binding fate and derives DCR only from marker-backed PCP.

Continuous PCP never accepts this raw-event transition. Ordinary no-marker fate requires OrdinaryBindingAuthority, while the fate of an epoch committed by fenced attach requires FencedAttachCommit::recovered_binding_fate.

§Errors

Returns the unchanged owed state unless fate names the exact participant and binding epoch carried by this cursor witness.

Source

pub const fn retarget( self, new_binding_epoch: BindingEpoch, episode_churn_used: u64, delta_cycles: u64, episode_churn_limit: u64, ) -> Result<Self, (Self, DetachedAttachRefusal)>

Retargets only continuous PCP after exact charged supersession.

§Errors

Returns the unchanged cursor and the exact delivered-marker, churn, or stale-authority refusal when retargeting is forbidden.

Source

pub fn leave( self, debt: ClosureDebt, event: Event, successor: DebtCompletion, ) -> Result<ClosureState, ClosureState>

Consumes exact live Leave and installs its measured clear/OP/PC result.

§Errors

Returns the unchanged owed state unless Leave names the exact live participant and binding epoch.

Trait Implementations§

Source§

impl Clone for ParticipantCursorProgress

Source§

fn clone(&self) -> ParticipantCursorProgress

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ParticipantCursorProgress

Source§

impl Debug for ParticipantCursorProgress

Source§

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

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

impl Eq for ParticipantCursorProgress

Source§

impl PartialEq for ParticipantCursorProgress

Source§

fn eq(&self, other: &ParticipantCursorProgress) -> 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 ParticipantCursorProgress

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.