pub struct EffectId<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> EffectId<T>
impl<T> EffectId<T>
Sourcepub const fn from_raw(raw: u64) -> Self
pub const fn from_raw(raw: u64) -> Self
Reconstruct an EffectId 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 EffectId. The raw value must be
one previously produced by EffectId::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 an EffectId with EffectId::from_raw.
Trait Implementations§
impl<T> Copy for EffectId<T>
impl<T: Eq> Eq for EffectId<T>
impl<T> StructuralPartialEq for EffectId<T>
Auto Trait Implementations§
impl<T> Freeze for EffectId<T>
impl<T> RefUnwindSafe for EffectId<T>
impl<T> Send for EffectId<T>
impl<T> Sync for EffectId<T>
impl<T> Unpin for EffectId<T>
impl<T> UnsafeUnpin for EffectId<T>
impl<T> UnwindSafe for EffectId<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more