Skip to main content

RollbackProbe

Enum RollbackProbe 

Source
pub enum RollbackProbe {
    Proven,
    NotApplicable,
}
Expand description

The outcome of OncePtrCell::dbg_rollback_reenterable — exactly the two answers that probe can give, and no third one it could never produce.

In particular there is no “rollback is broken” variant: the probe cannot distinguish that from “another thread legitimately owns the cell now”, because both make its postcondition CAS fail identically. See the method’s own docs for the full argument.

Variants§

§

Proven

The rollback provably cleared the sentinel: the probe’s postcondition CAS re-won the cell afterwards, so no future winner or spinning loser can be wedged by it. The cell is restored to UNINIT before returning.

§

NotApplicable

The probe could not run its check, and this is NOT evidence that rollback is broken. Either the cell was not UNINIT when the probe entered (already READY, or owned by another thread at that instant) — in which case the probe never touched it at all — or a real get_or_try_init caller re-won the cell during the probe’s own rollback-then-reCAS window, in which case the probe still does not touch it, but the cell is no longer necessarily UNINIT: the real caller may already be running init, or may have published READY, by the time this returns. Either way the probe never clobbers a state it does not own.

Trait Implementations§

Source§

impl Clone for RollbackProbe

Source§

fn clone(&self) -> RollbackProbe

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RollbackProbe

Source§

impl Debug for RollbackProbe

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RollbackProbe

Source§

impl PartialEq for RollbackProbe

Source§

fn eq(&self, other: &RollbackProbe) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RollbackProbe

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.