pub struct FastCasSuccess<R> { /* private fields */ }Expand description
Successful crate::FastCas result.
Implementations§
Source§impl<R> FastCasSuccess<R>
impl<R> FastCasSuccess<R>
Sourcepub const fn previous(&self) -> usize
pub const fn previous(&self) -> usize
Returns the state observed before successful completion.
§Returns
The state code read by the successful attempt.
Sourcepub fn into_output(self) -> R
pub fn into_output(self) -> R
Consumes this result and returns the business output.
§Returns
The output produced by the operation.
Sourcepub const fn is_updated(&self) -> bool
pub const fn is_updated(&self) -> bool
Tests whether this success came from an update decision.
§Returns
true when the operation successfully executed an update decision,
even if the installed state equals the previously observed state.
Sourcepub const fn is_finished(&self) -> bool
pub const fn is_finished(&self) -> bool
Tests whether this success came from a finish decision.
§Returns
true when the operation completed through a finish decision.
Trait Implementations§
Source§impl<R: Clone> Clone for FastCasSuccess<R>
impl<R: Clone> Clone for FastCasSuccess<R>
Source§fn clone(&self) -> FastCasSuccess<R>
fn clone(&self) -> FastCasSuccess<R>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<R: Debug> Debug for FastCasSuccess<R>
impl<R: Debug> Debug for FastCasSuccess<R>
Source§impl<R: PartialEq> PartialEq for FastCasSuccess<R>
impl<R: PartialEq> PartialEq for FastCasSuccess<R>
Source§fn eq(&self, other: &FastCasSuccess<R>) -> bool
fn eq(&self, other: &FastCasSuccess<R>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<R: Copy> Copy for FastCasSuccess<R>
impl<R: Eq> Eq for FastCasSuccess<R>
impl<R> StructuralPartialEq for FastCasSuccess<R>
Auto Trait Implementations§
impl<R> Freeze for FastCasSuccess<R>where
R: Freeze,
impl<R> RefUnwindSafe for FastCasSuccess<R>where
R: RefUnwindSafe,
impl<R> Send for FastCasSuccess<R>where
R: Send,
impl<R> Sync for FastCasSuccess<R>where
R: Sync,
impl<R> Unpin for FastCasSuccess<R>where
R: Unpin,
impl<R> UnsafeUnpin for FastCasSuccess<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for FastCasSuccess<R>where
R: UnwindSafe,
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
Mutably borrows from an owned value. Read more