Trait radium::marker::Nuclear

source ·
pub trait Nuclear: Copy {
    type Nucleus: Radium<Item = Self>;
}
Expand description

Relates a primitive type to its corresponding best-effort atomic type.

This is always implemented; however, because Nucleus uses RadiumT rather than AtomicT, the destination type might wind up being Cell<T>.

Behind the Name

Atoms and (eukaryotic) cells both have a nucleus. Technically each implementor of this trait is the nucleus, and the destination of the associated type is the nuclear thing that possesses a nucleus. Sorry this codebase isn’t a perfect reflection of biology and physics.

Required Associated Types§

source

type Nucleus: Radium<Item = Self>

The RadiumT type corresponding to Self.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Nuclear for bool

source§

impl Nuclear for i8

source§

impl Nuclear for i16

source§

impl Nuclear for i32

source§

impl Nuclear for i64

source§

impl Nuclear for i128

Note: the standard library has an unstable atomic for this type. radium commits to operating on the stable release series, and so will not use its atomic variant, but is willing to prepare for assumed stabilization by acting on the Cell.

source§

impl Nuclear for isize

source§

impl Nuclear for u8

source§

impl Nuclear for u16

source§

impl Nuclear for u32

source§

impl Nuclear for u64

source§

impl Nuclear for u128

Note: the standard library has an unstable atomic for this type. radium commits to operating on the stable release series, and so will not use its atomic variant, but is willing to prepare for assumed stabilization by acting on the Cell.

source§

impl Nuclear for usize

source§

impl<T> Nuclear for *mut T

Implementors§