pub struct SequenceLedger { /* private fields */ }Expand description
Validated delivery-sequence watermark and all unmaterialized claims.
Storage bindings may restore and inspect this factual snapshot, but cannot invoke the lower-level planner directly. Executable admission is owned by the protocol’s total lifecycle operations.
ⓘ
use liminal_protocol::lifecycle::SequenceLedger;
fn bypass_total_operation(ledger: SequenceLedger) {
let _ = ledger.plan_ordinary_record(0);
}Implementations§
Source§impl SequenceLedger
impl SequenceLedger
Sourcepub fn try_new(
high_watermark: u64,
claims: SequenceClaims,
) -> Result<Self, SequenceLedgerInvariantError>
pub fn try_new( high_watermark: u64, claims: SequenceClaims, ) -> Result<Self, SequenceLedgerInvariantError>
Restores a ledger only when its derived reserve fits the remaining suffix.
§Errors
Returns SequenceLedgerInvariantError if the canonical reserve sum
overflows u128 or exceeds u64::MAX - high_watermark.
Sourcepub const fn high_watermark(self) -> u64
pub const fn high_watermark(self) -> u64
Returns the greatest allocated delivery sequence.
Sourcepub const fn claims(self) -> SequenceClaims
pub const fn claims(self) -> SequenceClaims
Returns the primitive claims from which the reserve is derived.
Sourcepub fn budget(self) -> SequenceBudget
pub fn budget(self) -> SequenceBudget
Returns the canonical ten-field budget.
Sourcepub const fn required_reserve(self) -> u128
pub const fn required_reserve(self) -> u128
Returns the exact checked-wide reserve owned by the claims.
Trait Implementations§
Source§impl Clone for SequenceLedger
impl Clone for SequenceLedger
Source§fn clone(&self) -> SequenceLedger
fn clone(&self) -> SequenceLedger
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SequenceLedger
Source§impl Debug for SequenceLedger
impl Debug for SequenceLedger
impl Eq for SequenceLedger
Source§impl PartialEq for SequenceLedger
impl PartialEq for SequenceLedger
impl StructuralPartialEq for SequenceLedger
Auto Trait Implementations§
impl Freeze for SequenceLedger
impl RefUnwindSafe for SequenceLedger
impl Send for SequenceLedger
impl Sync for SequenceLedger
impl Unpin for SequenceLedger
impl UnsafeUnpin for SequenceLedger
impl UnwindSafe for SequenceLedger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more