Trait AtomicBitOps

Source
pub trait AtomicBitOps {
    // Required methods
    fn set_bit(&self, bit: usize) -> bool;
    fn clear_bit(&self, bit: usize) -> bool;
    fn toggle_bit(&self, bit: usize) -> bool;
    fn test_bit(&self, bit: usize) -> bool;
    fn find_first_set(&self) -> Option<usize>;
}
Expand description

Atomic bit operations

Required Methods§

Source

fn set_bit(&self, bit: usize) -> bool

Set bit atomically

Source

fn clear_bit(&self, bit: usize) -> bool

Clear bit atomically

Source

fn toggle_bit(&self, bit: usize) -> bool

Toggle bit atomically

Source

fn test_bit(&self, bit: usize) -> bool

Test bit

Source

fn find_first_set(&self) -> Option<usize>

Find first set bit

Implementations on Foreign Types§

Source§

impl AtomicBitOps for AtomicU8

Source§

fn set_bit(&self, bit: usize) -> bool

Source§

fn clear_bit(&self, bit: usize) -> bool

Source§

fn toggle_bit(&self, bit: usize) -> bool

Source§

fn test_bit(&self, bit: usize) -> bool

Source§

fn find_first_set(&self) -> Option<usize>

Source§

impl AtomicBitOps for AtomicU16

Source§

fn set_bit(&self, bit: usize) -> bool

Source§

fn clear_bit(&self, bit: usize) -> bool

Source§

fn toggle_bit(&self, bit: usize) -> bool

Source§

fn test_bit(&self, bit: usize) -> bool

Source§

fn find_first_set(&self) -> Option<usize>

Source§

impl AtomicBitOps for AtomicU32

Source§

fn set_bit(&self, bit: usize) -> bool

Source§

fn clear_bit(&self, bit: usize) -> bool

Source§

fn toggle_bit(&self, bit: usize) -> bool

Source§

fn test_bit(&self, bit: usize) -> bool

Source§

fn find_first_set(&self) -> Option<usize>

Source§

impl AtomicBitOps for AtomicU64

Source§

fn set_bit(&self, bit: usize) -> bool

Source§

fn clear_bit(&self, bit: usize) -> bool

Source§

fn toggle_bit(&self, bit: usize) -> bool

Source§

fn test_bit(&self, bit: usize) -> bool

Source§

fn find_first_set(&self) -> Option<usize>

Source§

impl AtomicBitOps for AtomicUsize

Source§

fn set_bit(&self, bit: usize) -> bool

Source§

fn clear_bit(&self, bit: usize) -> bool

Source§

fn toggle_bit(&self, bit: usize) -> bool

Source§

fn test_bit(&self, bit: usize) -> bool

Source§

fn find_first_set(&self) -> Option<usize>

Implementors§