pub struct ParkedEffectId<T = ()> { /* private fields */ }Expand description
Opaque ID for a parked effect request.
The raw value packs a slab index and generation into a single integer so callers can pass it over custom FFI boundaries without learning the storage layout.
Implementations§
Source§impl<T> ParkedEffectId<T>
impl<T> ParkedEffectId<T>
Sourcepub const fn from_raw(raw: u64) -> Self
pub const fn from_raw(raw: u64) -> Self
Reconstruct a ParkedEffectId from its raw integer representation.
Use this on the resolve path to turn an id received back from a custom
FFI (as a plain integer) into a typed ParkedEffectId. The raw value must be
one previously produced by ParkedEffectId::into_raw; arbitrary integers may
refer to no request, or to a stale slot.
Sourcepub const fn into_raw(self) -> u64
pub const fn into_raw(self) -> u64
Unpack the id into its raw integer representation for passing across a custom FFI boundary.
The returned value packs both the slab index and the generation, and can
be turned back into a ParkedEffectId with ParkedEffectId::from_raw.
Trait Implementations§
Source§impl<T> Clone for ParkedEffectId<T>
impl<T> Clone for ParkedEffectId<T>
Source§impl<T: Debug> Debug for ParkedEffectId<T>
impl<T: Debug> Debug for ParkedEffectId<T>
Source§impl<T: Hash> Hash for ParkedEffectId<T>
impl<T: Hash> Hash for ParkedEffectId<T>
Source§impl<T: PartialEq> PartialEq for ParkedEffectId<T>
impl<T: PartialEq> PartialEq for ParkedEffectId<T>
Source§fn eq(&self, other: &ParkedEffectId<T>) -> bool
fn eq(&self, other: &ParkedEffectId<T>) -> bool
self and other values to be equal, and is used by ==.