pub struct PreparedTransition { /* private fields */ }Expand description
A validated, not-yet-applied ownership transition. Holding one is proof that
every CAS and safety check passed; the only thing left is to
activate it against the catalog. It carries the full
before/after picture so it doubles as the audit record source.
Implementations§
Source§impl PreparedTransition
impl PreparedTransition
Sourcepub fn next_entry(&self) -> &RangeOwnership
pub fn next_entry(&self) -> &RangeOwnership
The new ownership entry that activation will install — epoch and version already advanced past the current entry.
Sourcepub fn new_epoch(&self) -> OwnershipEpoch
pub fn new_epoch(&self) -> OwnershipEpoch
The ownership epoch the new owner becomes authoritative under. Any write the old owner attempts under the previous epoch is fenced once this is installed.
Sourcepub fn activate(
self,
catalog: &mut ShardOwnershipCatalog,
) -> Result<TransitionOutcome, CatalogError>
pub fn activate( self, catalog: &mut ShardOwnershipCatalog, ) -> Result<TransitionOutcome, CatalogError>
Apply the transition to the catalog, making the new owner authoritative
and fencing the old owner via the epoch bump. Returns the audit-ready
TransitionOutcome. Errors only on a catalog-level inconsistency
(e.g. the entry changed between prepare and activate so the version no
longer strictly advances) — the safety decision itself was already made.
Trait Implementations§
Source§impl Clone for PreparedTransition
impl Clone for PreparedTransition
Source§fn clone(&self) -> PreparedTransition
fn clone(&self) -> PreparedTransition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PreparedTransition
impl Debug for PreparedTransition
impl Eq for PreparedTransition
Source§impl PartialEq for PreparedTransition
impl PartialEq for PreparedTransition
Source§fn eq(&self, other: &PreparedTransition) -> bool
fn eq(&self, other: &PreparedTransition) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PreparedTransition
Auto Trait Implementations§
impl Freeze for PreparedTransition
impl RefUnwindSafe for PreparedTransition
impl Send for PreparedTransition
impl Sync for PreparedTransition
impl Unpin for PreparedTransition
impl UnsafeUnpin for PreparedTransition
impl UnwindSafe for PreparedTransition
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> 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 moreSource§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