Skip to main content

AtomicStorage

Trait AtomicStorage 

Source
pub trait AtomicStorage: Sized {
    const BITS: usize;

    // Required methods
    fn get(&self) -> u32;
    fn set(&self, val: u32);
    fn default() -> Self;
}
Expand description

Trait for atomics used in cache storage

Required Associated Constants§

Required Methods§

Source

fn get(&self) -> u32

Source

fn set(&self, val: u32)

Source

fn default() -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AtomicStorage for AtomicU8

Source§

const BITS: usize = 8

Source§

fn get(&self) -> u32

Source§

fn set(&self, val: u32)

Source§

fn default() -> Self

Source§

impl AtomicStorage for AtomicU16

Source§

const BITS: usize = 16

Source§

fn get(&self) -> u32

Source§

fn set(&self, val: u32)

Source§

fn default() -> Self

Source§

impl AtomicStorage for AtomicU32

Source§

const BITS: usize = 32

Source§

fn get(&self) -> u32

Source§

fn set(&self, val: u32)

Source§

fn default() -> Self

Implementors§