pub struct AtomicEnum<Inner>where
Inner: FromPrimitive + ToPrimitive,{ /* private fields */ }
Expand description
Given an enum value deriving FromPrimitive
/ToPrimitive
, handles storing the value as an
atomic usize.
Implementations§
Source§impl<Inner> AtomicEnum<Inner>where
Inner: FromPrimitive + ToPrimitive,
impl<Inner> AtomicEnum<Inner>where
Inner: FromPrimitive + ToPrimitive,
Trait Implementations§
Source§impl<T> AtomicValue for AtomicEnum<T>where
T: ToPrimitive + FromPrimitive,
impl<T> AtomicValue for AtomicEnum<T>where
T: ToPrimitive + FromPrimitive,
type Inner = T
fn get(&self) -> <AtomicEnum<T> as AtomicValue>::Inner
fn set(&self, value: <AtomicEnum<T> as AtomicValue>::Inner)
Source§impl<Inner> Debug for AtomicEnum<Inner>
impl<Inner> Debug for AtomicEnum<Inner>
Source§impl<Inner> Default for AtomicEnum<Inner>
impl<Inner> Default for AtomicEnum<Inner>
Source§fn default() -> AtomicEnum<Inner>
fn default() -> AtomicEnum<Inner>
Returns the “default value” for a type. Read more
Source§impl<Inner> From<Inner> for AtomicEnum<Inner>where
Inner: FromPrimitive + ToPrimitive,
impl<Inner> From<Inner> for AtomicEnum<Inner>where
Inner: FromPrimitive + ToPrimitive,
Source§fn from(inner: Inner) -> AtomicEnum<Inner>
fn from(inner: Inner) -> AtomicEnum<Inner>
Converts to this type from the input type.
Auto Trait Implementations§
impl<Inner> !Freeze for AtomicEnum<Inner>
impl<Inner> RefUnwindSafe for AtomicEnum<Inner>where
Inner: RefUnwindSafe,
impl<Inner> Send for AtomicEnum<Inner>where
Inner: Send,
impl<Inner> Sync for AtomicEnum<Inner>where
Inner: Sync,
impl<Inner> Unpin for AtomicEnum<Inner>where
Inner: Unpin,
impl<Inner> UnwindSafe for AtomicEnum<Inner>where
Inner: 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