pub trait AtomicImpl: Sized + Send + Copy + Sealed {
    type Delta;
}
Expand description

A marker trait for types that implement atomic operations with C side primitives.

This trait is sealed, and only types that map directly to the C side atomics or can be implemented with lower-level C primitives are allowed to implement this:

  • i8 and i16 are implemented with lower-level C primitives.
  • i32 map to atomic_t
  • i64 map to atomic64_t

Required Associated Types§

source

type Delta

The type of the delta in arithmetic or logical operations.

For example, in atomic_add(ptr, v), it’s the type of v. Usually it’s the same type of Self, but it may be different for the atomic pointer type.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AtomicImpl for i8

§

type Delta = i8

source§

impl AtomicImpl for i16

§

type Delta = i16

source§

impl AtomicImpl for i32

§

type Delta = i32

source§

impl AtomicImpl for i64

§

type Delta = i64

Implementors§