pub struct MarkerProofState { /* private fields */ }Expand description
Durable participant facts read by the total marker-proof selector.
Implementations§
Source§impl MarkerProofState
impl MarkerProofState
Sourcepub const fn new(
current_cursor: DeliverySeq,
accepted_marker_at_cursor: bool,
expected_marker_delivery_seq: Option<DeliverySeq>,
proof_binding_epoch: BindingEpoch,
delivered_to_proof_epoch: Option<ParticipantCursorProgress>,
) -> Self
pub const fn new( current_cursor: DeliverySeq, accepted_marker_at_cursor: bool, expected_marker_delivery_seq: Option<DeliverySeq>, proof_binding_epoch: BindingEpoch, delivered_to_proof_epoch: Option<ParticipantCursorProgress>, ) -> Self
Creates one immutable snapshot of the durable marker proof facts.
The final field requires a cursor-progress witness. A planned, still
undelivered crate::lifecycle::MarkerDelivery cannot be supplied as
proof by construction.
ⓘ
use liminal_protocol::{
lifecycle::{MarkerDelivery, MarkerProofState},
wire::BindingEpoch,
};
fn undelivered_is_not_proof(epoch: BindingEpoch, delivery: MarkerDelivery) {
let _ = MarkerProofState::new(0, false, Some(1), epoch, Some(delivery));
}Sourcepub const fn current_cursor(self) -> DeliverySeq
pub const fn current_cursor(self) -> DeliverySeq
Returns the participant’s durable cumulative cursor.
Sourcepub const fn accepted_marker_at_cursor(self) -> bool
pub const fn accepted_marker_at_cursor(self) -> bool
Returns whether the record at the cursor is this participant’s accepted marker.
Sourcepub const fn expected_marker_delivery_seq(self) -> Option<DeliverySeq>
pub const fn expected_marker_delivery_seq(self) -> Option<DeliverySeq>
Returns the currently expected marker anchor, if any.
Sourcepub const fn proof_binding_epoch(self) -> BindingEpoch
pub const fn proof_binding_epoch(self) -> BindingEpoch
Returns the exact binding epoch against which delivery must be proven.
Sourcepub const fn delivered_to_proof_epoch(self) -> Option<ParticipantCursorProgress>
pub const fn delivered_to_proof_epoch(self) -> Option<ParticipantCursorProgress>
Returns the marker-backed cursor witness proving exact delivery, if present.
Trait Implementations§
Source§impl Clone for MarkerProofState
impl Clone for MarkerProofState
Source§fn clone(&self) -> MarkerProofState
fn clone(&self) -> MarkerProofState
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 MarkerProofState
Source§impl Debug for MarkerProofState
impl Debug for MarkerProofState
impl Eq for MarkerProofState
Source§impl PartialEq for MarkerProofState
impl PartialEq for MarkerProofState
impl StructuralPartialEq for MarkerProofState
Auto Trait Implementations§
impl Freeze for MarkerProofState
impl RefUnwindSafe for MarkerProofState
impl Send for MarkerProofState
impl Sync for MarkerProofState
impl Unpin for MarkerProofState
impl UnsafeUnpin for MarkerProofState
impl UnwindSafe for MarkerProofState
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