pub struct PhysicalCompaction { /* private fields */ }Expand description
Physical-compaction range witness.
Implementations§
Source§impl PhysicalCompaction
impl PhysicalCompaction
Sourcepub const fn new(
from_floor: DeliverySeq,
through_seq: DeliverySeq,
) -> Option<Self>
pub const fn new( from_floor: DeliverySeq, through_seq: DeliverySeq, ) -> Option<Self>
Creates a nonempty, ordered compaction range.
Sourcepub const fn from_floor(self) -> DeliverySeq
pub const fn from_floor(self) -> DeliverySeq
Returns the exact first sequence in the compaction range.
Sourcepub const fn through_seq(self) -> DeliverySeq
pub const fn through_seq(self) -> DeliverySeq
Returns the exact inclusive compaction boundary.
Source§impl PhysicalCompaction
impl PhysicalCompaction
Sourcepub fn apply_recovered_binding_fate(
self,
debt: ClosureDebt,
resulting_debt: ClosureDebt,
authority: RecoveredBindingFate,
) -> Result<RecoveredBindingFateTransition, RecoveredBindingFate>
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.
Sourcepub fn complete_after_recovered_binding_fate(
self,
event: Event,
resulting_debt: Option<ClosureDebt>,
pending: PendingRecoveredCursorRelease,
) -> Result<ClosureState, PendingRecoveredCursorRelease>
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.
Sourcepub const fn clear_after_completion(
&self,
event: &Event,
) -> Option<ProjectionCompactionSuccessor>
pub const fn clear_after_completion( &self, event: &Event, ) -> Option<ProjectionCompactionSuccessor>
Validates clear selection after exact PC completion.
Sourcepub const fn strict_after_completion(
&self,
event: &Event,
debt: ClosureDebt,
edge: StoredEdge,
successor_boundary: DeliverySeq,
) -> Option<ProjectionCompactionSuccessor>
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.
Sourcepub fn complete(
self,
debt: ClosureDebt,
event: Event,
successor: ProjectionCompactionSuccessor,
) -> Result<ClosureState, ClosureState>
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.
Sourcepub const fn marker_appended(
self,
debt: ClosureDebt,
event: Event,
) -> Result<ClosureState, ClosureState>
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.
Sourcepub const fn preserve_progress(
self,
debt: ClosureDebt,
event: Event,
resulting_debt: ClosureDebt,
) -> Result<ClosureState, ClosureState>
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.
Sourcepub const fn clear_after_progress(
&self,
event: &Event,
) -> Option<ProjectionCompactionSuccessor>
pub const fn clear_after_progress( &self, event: &Event, ) -> Option<ProjectionCompactionSuccessor>
Validates clear selection when an ack, fate, or Leave covers this PC.
Sourcepub const fn strict_after_progress(
&self,
event: &Event,
debt: ClosureDebt,
edge: StoredEdge,
successor_boundary: DeliverySeq,
) -> Option<ProjectionCompactionSuccessor>
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.
Sourcepub fn covered_by_progress(
self,
debt: ClosureDebt,
event: Event,
successor: ProjectionCompactionSuccessor,
) -> Result<ClosureState, ClosureState>
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.
Sourcepub const fn unchanged(self, debt: ClosureDebt) -> ClosureState
pub const fn unchanged(self, debt: ClosureDebt) -> ClosureState
No-op and refused acknowledgements consume no event and preserve exact PC.
Sourcepub 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)>
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.
Sourcepub 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)>
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
impl Clone for PhysicalCompaction
Source§fn clone(&self) -> PhysicalCompaction
fn clone(&self) -> PhysicalCompaction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more