Skip to main content

PhysicalCompaction

Struct PhysicalCompaction 

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

Physical-compaction range witness.

Implementations§

Source§

impl PhysicalCompaction

Source

pub const fn new( from_floor: DeliverySeq, through_seq: DeliverySeq, ) -> Option<Self>

Creates a nonempty, ordered compaction range.

Source

pub const fn from_floor(self) -> DeliverySeq

Returns the exact first sequence in the compaction range.

Source

pub const fn through_seq(self) -> DeliverySeq

Returns the exact inclusive compaction boundary.

Source§

impl PhysicalCompaction

Source

pub fn apply_recovered_binding_fate( self, debt: ClosureDebt, resulting_debt: ClosureDebt, authority: RecoveredBindingFate, ) -> Result<RecoveredBindingFateTransition, RecoveredBindingFate>

Applies recovered binding fate by preserving or covering this exact PC.

A fate floor at or below through_seq preserves PC and returns a latent cursor-release suffix. A greater floor covers PC immediately and selects the exact cursor release derived from the fenced attach.

§Errors

Returns the unconsumed authority unless it was derived for this exact PC and its exact post-attach debt.

Source

pub fn complete_after_recovered_binding_fate( self, event: Event, resulting_debt: Option<ClosureDebt>, pending: PendingRecoveredCursorRelease, ) -> Result<ClosureState, PendingRecoveredCursorRelease>

Consumes a latent recovered cursor suffix on exact PC completion.

§Errors

Returns the pending authority intact unless it belongs to this exact PC and the completion event covers its exact stored range.

Source

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

Validates clear selection after exact PC completion.

Source

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

Validates a non-DCR strict suffix after exact PC completion.

Source

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

Consumes exact PC completion.

§Errors

Returns the unchanged owed state when the event or successor authority does not belong to this exact compaction range.

Source

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

Records a later marker append while preserving this exact active range.

§Errors

Returns the unchanged owed state unless the appended marker lies strictly after the physical-compaction range and its projection target covers that marker.

Source

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

Applies an advancing ack, fate, or Leave whose resulting floor does not cover this PC, preserving the exact range while debt remains.

§Errors

Returns the unchanged owed state when the event is not a progress class or its resulting floor covers the stored range.

Source

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

Validates clear selection when an ack, fate, or Leave covers this PC.

Source

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

Validates a strict non-DCR suffix when an ack, fate, or Leave covers PC.

Source

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

Consumes the covering ack/fate/Leave event and its validated suffix.

§Errors

Returns the unchanged owed state when the successor authority is not bound to this range and event.

Source

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

No-op and refused acknowledgements consume no event and preserve exact PC.

Source

pub const fn charged_binding_change_preserving( self, debt: ClosureDebt, episode_churn_used: u64, delta_cycles: u64, episode_churn_limit: u64, resulting_floor: DeliverySeq, resulting_debt: ClosureDebt, ) -> Result<ClosureState, (ClosureState, DetachedAttachRefusal)>

Applies a charged binding change that leaves this PC range uncovered.

§Errors

Returns the unchanged state with the precise churn or stale-selection refusal when charging fails or the measured floor covers the range.

Source

pub const fn charged_binding_change_covering( self, debt: ClosureDebt, episode_churn_used: u64, delta_cycles: u64, episode_churn_limit: u64, resulting_floor: DeliverySeq, resulting_debt: ClosureDebt, edge: StoredEdge, successor_boundary: DeliverySeq, ) -> Result<ClosureState, (ClosureState, DetachedAttachRefusal)>

Applies a charged binding change whose measured floor covers this PC.

§Errors

Returns the unchanged state with the precise churn or stale-selection refusal when charging fails or the proposed strict suffix is invalid.

Trait Implementations§

Source§

impl Clone for PhysicalCompaction

Source§

fn clone(&self) -> PhysicalCompaction

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 PhysicalCompaction

Source§

impl Debug for PhysicalCompaction

Source§

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

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

impl Eq for PhysicalCompaction

Source§

impl PartialEq for PhysicalCompaction

Source§

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

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.