[][src]Trait atomic_traits::fetch::Update

pub trait Update {
    type Type;
    fn fetch_update<F>(
        &self,
        f: F,
        fetch_order: Ordering,
        set_order: Ordering
    ) -> Result<Self::Type, Self::Type>
    where
        F: FnMut(Self::Type) -> Option<Self::Type>
; }

Fetches the value, and applies a function to it that returns an optional new value.

Associated Types

type Type

The underlying type

Loading content...

Required methods

fn fetch_update<F>(
    &self,
    f: F,
    fetch_order: Ordering,
    set_order: Ordering
) -> Result<Self::Type, Self::Type> where
    F: FnMut(Self::Type) -> Option<Self::Type>, 

Fetches the value, and applies a function to it that returns an optional new value.

Returns a Result of Ok(previous_value) if the function returned Some(_), else Err(previous_value).

Loading content...

Implementations on Foreign Types

impl Update for AtomicIsize[src]

type Type = isize

impl Update for AtomicUsize[src]

type Type = usize

impl Update for AtomicI8[src]

type Type = i8

impl Update for AtomicI16[src]

type Type = i16

impl Update for AtomicI32[src]

type Type = i32

impl Update for AtomicI64[src]

type Type = i64

impl Update for AtomicU8[src]

type Type = u8

impl Update for AtomicU16[src]

type Type = u16

impl Update for AtomicU32[src]

type Type = u32

impl Update for AtomicU64[src]

type Type = u64

Loading content...

Implementors

Loading content...