Trait AtomicImpl

Source
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 have directly mapping to the C side atomics should impl this:

  • i32 maps to atomic_t.
  • i64 maps 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.

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 AtomicImpl for i32

Source§

impl AtomicImpl for i64

Implementors§