pub struct SsaCommitmentGuard<S: PixSpec + Clone> {
owned: Option<(Arc<SsaReconstructor<S>>, SsaId<<S as PixSpec>::Pseudonym>)>,
}Expand description
Ownership of an Exit SSA commitment, released when dropped.
Registering an Exit commitment is the first fallible step of many: the request still has to be
encoded, sent, and answered. Every early return between here and the point where a permanent
owner takes over would otherwise strand the commitment in the reconstructor until its own
lifetime expired, and a stranded commitment is not inert — its SsaId is occupied, so a retry at
the same index is rejected as a duplicate.
Move-only by design: no Clone, no Copy, so there is exactly one release point. A success path
hands ownership on with disarm rather than letting the guard fall out of scope.
Dropping releases the registration without retiring the SSA, so the same index can be
requested again — see SsaReconstructor::release_abandoned_commitment for why that
distinction is load-bearing.
Fields§
§owned: Option<(Arc<SsaReconstructor<S>>, SsaId<<S as PixSpec>::Pseudonym>)>None once disarmed, which is the only state in which Drop does nothing.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<S> !RefUnwindSafe for SsaCommitmentGuard<S>
impl<S> !UnwindSafe for SsaCommitmentGuard<S>
impl<S> Freeze for SsaCommitmentGuard<S>
impl<S> Send for SsaCommitmentGuard<S>
impl<S> Sync for SsaCommitmentGuard<S>
impl<S> Unpin for SsaCommitmentGuard<S>
impl<S> UnsafeUnpin for SsaCommitmentGuard<S>
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
§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