pub trait Payload:
From<<Self::UnderlyingAtomic as AtomicPrimitive>::InnerPrimitive>
+ Into<<Self::UnderlyingAtomic as AtomicPrimitive>::InnerPrimitive>
+ Copy {
type UnderlyingAtomic: AtomicPrimitive;
}Expand description
Trait for payload types that can be stored and loaded atomically by the
SoftCycleController.
A type implements Payload by specifying an UnderlyingAtomic
that implements AtomicPrimitive, and implementing From/Into for the atomic’s inner
type. Only types representable in a single atomic slot (e.g. primitives, pointers) are
supported; the controller does not allocate or clone payloads.
Required Associated Types§
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<T> Payload for *const T
impl<T> Payload for *const T
type UnderlyingAtomic = AtomicConstPtr<T>
Implementors§
Source§impl Payload for SoftCycleMessage
Available on crate feature global_instance only.
impl Payload for SoftCycleMessage
Available on crate feature
global_instance only.