pub enum ShareResolution<P, A> {
RecoveredSsa(RecoveredSsa<P, A>),
AlmostRecoveredSsa(SsaId<P>),
Progress(SsaRecoveryProgress<P>),
InvalidShares {
peer: Box<OffchainPublicKey>,
ssa_id: SsaId<P>,
observed_total: u64,
},
}Expand description
Possible resolutions of a received acknowledgement that might be bound to decrypt an encrypted PIX share.
P is the pseudonym type, A is the private key type for SSA.
§Ordering and multiplicity within one batch
acknowledge_shares emits at most one
Progress and at most one InvalidShares per SSA per
call, and orders them ahead of the terminal
AlmostRecoveredSsa/RecoveredSsa for the
same SSA. A consumer can therefore act on a terminal event knowing the counters it would have
wanted first have already been delivered.
Variants§
RecoveredSsa(RecoveredSsa<P, A>)
Full SSA was recovered.
AlmostRecoveredSsa(SsaId<P>)
The early recovery threshold was reached (SSA almost complete).
Progress(SsaRecoveryProgress<P>)
Absolute recovery progress for one SSA after this batch.
Invalid (unverifiable) shares were encountered for an SSA.
observed_total is the cross-peer aggregate for the SSA, not a delta and not this peer’s
share of it: the cycle is a single unit of accounting and any relayer can carry shares for it.
peer identifies who relayed the share that triggered this emission, for attribution only.
Implementations§
pub fn try_as_recovered_ssa(self) -> Option<RecoveredSsa<P, A>>
pub const fn try_as_recovered_ssa_ref(&self) -> Option<&RecoveredSsa<P, A>>
pub fn try_as_recovered_ssa_mut(&mut self) -> Option<&mut RecoveredSsa<P, A>>
pub fn try_as_almost_recovered_ssa(self) -> Option<SsaId<P>>
pub const fn try_as_almost_recovered_ssa_ref(&self) -> Option<&SsaId<P>>
pub fn try_as_almost_recovered_ssa_mut(&mut self) -> Option<&mut SsaId<P>>
pub fn try_as_progress(self) -> Option<SsaRecoveryProgress<P>>
pub const fn try_as_progress_ref(&self) -> Option<&SsaRecoveryProgress<P>>
pub fn try_as_progress_mut(&mut self) -> Option<&mut SsaRecoveryProgress<P>>
Trait Implementations§
Source§fn clone(&self) -> ShareResolution<P, A>
fn clone(&self) -> ShareResolution<P, A>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more