#[non_exhaustive]pub enum AcsEntry {
Active(ActiveContract),
IncompleteUnassigned(IncompleteUnassigned),
IncompleteAssigned(IncompleteAssigned),
}Expand description
One entry of an Active Contract Set snapshot.
A snapshot is not only active contracts. A reassignment that is half-done at
the snapshot offset appears as an incomplete entry — unassigned from one
synchronizer with no matching assignment yet, or assigned to one with the
unassignment out of view — and an application that reads only
Active sees a contract that has left one synchronizer and
not arrived at the other simply vanish. The Ledger API sends these precisely
so a multi-synchronizer application can bootstrap without that hole, which is
why there is a lossless read.
#[non_exhaustive]: the Ledger API may add an entry kind.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Active(ActiveContract)
A contract active on the synchronizer named in the entry.
IncompleteUnassigned(IncompleteUnassigned)
Unassigned before the snapshot offset with no assignment before it — the contract is in flight out of this synchronizer.
IncompleteAssigned(IncompleteAssigned)
Assigned before the snapshot offset with no unassignment before it. Note this does not say the contract is active on the target synchronizer; the proto is explicit about that.
Implementations§
Source§impl AcsEntry
impl AcsEntry
Sourcepub fn active(&self) -> Option<&ActiveContract>
pub fn active(&self) -> Option<&ActiveContract>
The active contract, if this entry is one.
Sourcepub fn into_active(self) -> Option<ActiveContract>
pub fn into_active(self) -> Option<ActiveContract>
Consume the entry, yielding the active contract if it is one.
Trait Implementations§
impl StructuralPartialEq for AcsEntry
Auto Trait Implementations§
impl Freeze for AcsEntry
impl RefUnwindSafe for AcsEntry
impl Send for AcsEntry
impl Sync for AcsEntry
impl Unpin for AcsEntry
impl UnsafeUnpin for AcsEntry
impl UnwindSafe for AcsEntry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request