safeatomic

Trait AsAtomicBytes

Source
pub trait AsAtomicBytes:
    IntoBytes
    + FromBytes
    + Immutable
    + KnownLayout {
    // Provided method
    fn as_atomic_bytes(&mut self) -> &[AtomicU8] { ... }
}
Expand description

A helper trait for types that can be safely transmuted to and from byte slices.

Provided Methods§

Source

fn as_atomic_bytes(&mut self) -> &[AtomicU8]

Casts the type to a slice of atomic bytes.

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.

Implementors§

Source§

impl<T> AsAtomicBytes for T
where T: IntoBytes + FromBytes + ?Sized + Immutable + KnownLayout,