Struct utils_atomics::bitfield::AtomicBitBox
source · [−]#[repr(transparent)]pub struct AtomicBitBox<T: AtomicInt = AtomicU8, A: Allocator = Global> { /* private fields */ }
Available on crate feature
alloc
only.Expand description
Bitfield used with atomic operations
Implementations
sourceimpl<T: AtomicInt> AtomicBitBox<T>where
T::Primitive: BitFieldAble,
impl<T: AtomicInt> AtomicBitBox<T>where
T::Primitive: BitFieldAble,
sourceimpl<T: AtomicInt, A: Allocator> AtomicBitBox<T, A>where
T::Primitive: BitFieldAble,
impl<T: AtomicInt, A: Allocator> AtomicBitBox<T, A>where
T::Primitive: BitFieldAble,
pub fn new_in(bits: usize, alloc: A) -> Self
pub fn try_new_in(bits: usize, alloc: A) -> Result<Self, AllocError>
pub fn get(&self, idx: usize, order: Ordering) -> Option<bool>
pub fn set(&self, v: bool, idx: usize, order: Ordering) -> Option<bool>
pub fn set_true(&self, idx: usize, order: Ordering) -> Option<bool>
pub fn set_false(&self, idx: usize, order: Ordering) -> Option<bool>
Auto Trait Implementations
impl<T, A> RefUnwindSafe for AtomicBitBox<T, A>where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, A> Send for AtomicBitBox<T, A>where
A: Send,
impl<T, A> Sync for AtomicBitBox<T, A>where
A: Sync,
impl<T, A> Unpin for AtomicBitBox<T, A>
impl<T, A> UnwindSafe for AtomicBitBox<T, A>where
A: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more