pub struct CommitPublicationGate { /* private fields */ }Expand description
Manages the commit-publication gate: markers are not published until the durability quorum is satisfied.
Implementations§
Source§impl CommitPublicationGate
impl CommitPublicationGate
Sourcepub fn new(marker: CommitMarker, policy: QuorumPolicy) -> Self
pub fn new(marker: CommitMarker, policy: QuorumPolicy) -> Self
Create a gate for the given marker and quorum policy.
Sourcepub fn record_store_acceptance(&mut self, store_id: u32)
pub fn record_store_acceptance(&mut self, store_id: u32)
Record that a store accepted the commit’s symbols.
Sourcepub fn try_publish(&mut self) -> Option<&CommitMarker>
pub fn try_publish(&mut self) -> Option<&CommitMarker>
Try to publish the marker. Returns the marker if quorum is met, None if not yet satisfied.
Sourcepub const fn is_published(&self) -> bool
pub const fn is_published(&self) -> bool
Is the marker published?
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommitPublicationGate
impl RefUnwindSafe for CommitPublicationGate
impl Send for CommitPublicationGate
impl Sync for CommitPublicationGate
impl Unpin for CommitPublicationGate
impl UnsafeUnpin for CommitPublicationGate
impl UnwindSafe for CommitPublicationGate
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).