pub enum NativeSuspensionClass {
Inert,
CallbackDriven(&'static [usize]),
MaySuspend,
}Expand description
How a native’s runtime ABI can leave the synchronous happy path.
Consumed by the VM’s non-suspending HOF fast path: a callback whose call
graph reaches only Inert natives (and CallbackDriven natives whose
callback arguments are themselves provably inert) can run its element loop
synchronously, skipping the cooperative drive round-trip per call.
Variants§
Inert
Settles synchronously — returns a value or raises. Every native without
a runtime ABI is inherently inert (its only outcome is Return).
CallbackDriven(&'static [usize])
Emits NativeOutcome::Call for user callbacks taken at these argument
positions and suspends only when one of those callbacks suspends (the
cooperative HOFs: map/filter/foldl/…).
MaySuspend
May park the task or issue runtime requests (async/channel/IO offload). The conservative default for every native with a runtime ABI.
Trait Implementations§
Source§impl Clone for NativeSuspensionClass
impl Clone for NativeSuspensionClass
Source§fn clone(&self) -> NativeSuspensionClass
fn clone(&self) -> NativeSuspensionClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NativeSuspensionClass
Source§impl Debug for NativeSuspensionClass
impl Debug for NativeSuspensionClass
impl Eq for NativeSuspensionClass
Source§impl PartialEq for NativeSuspensionClass
impl PartialEq for NativeSuspensionClass
impl StructuralPartialEq for NativeSuspensionClass
Auto Trait Implementations§
impl Freeze for NativeSuspensionClass
impl RefUnwindSafe for NativeSuspensionClass
impl Send for NativeSuspensionClass
impl Sync for NativeSuspensionClass
impl Unpin for NativeSuspensionClass
impl UnsafeUnpin for NativeSuspensionClass
impl UnwindSafe for NativeSuspensionClass
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.