Skip to main content

SpawnRequest

Enum SpawnRequest 

Source
pub enum SpawnRequest<Inline = Infallible> {
    Send(Pin<Box<dyn Future<Output = ()> + Send + 'static>>),
    Factory(Box<dyn FnOnce() -> Pin<Box<dyn Future<Output = ()> + 'static>> + Send + 'static>),
    SendInline(Inline),
    Shutdown,
}
Expand description

Cross-core worker dispatch message used by Runtime impls. Generic over an Inline extension type so prime’s typed-future fast path can add a variant (SendInline) carrying its InlineTask, while tokio’s per-core impl uses the default (Infallible) which makes the SendInline arm unreachable.

Trace-span context no longer travels embedded in this enum (moved to telemetry::Spanned<T>, which wraps the future itself) — see Wave D Phase 1.

Variants§

§

Send(Pin<Box<dyn Future<Output = ()> + Send + 'static>>)

A Send future shipped across cores; runs locally on arrival.

§

Factory(Box<dyn FnOnce() -> Pin<Box<dyn Future<Output = ()> + 'static>> + Send + 'static>)

A Send closure that builds a ?Send future on the target core. Lets cross-thread callers dispatch per-core-only futures.

§

SendInline(Inline)

Runtime-impl-specific extension. Default (Infallible) makes this arm unreachable. Prime sets Inline = InlineTask to carry typed futures without the Pin<Box<dyn Future>> allocation.

§

Shutdown

Graceful shutdown signal — the worker breaks its event loop.

Trait Implementations§

Source§

impl<Inline> Debug for SpawnRequest<Inline>

Available on crate feature alloc only.
Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Inline = !> !RefUnwindSafe for SpawnRequest<Inline>

§

impl<Inline = !> !Sync for SpawnRequest<Inline>

§

impl<Inline = !> !UnwindSafe for SpawnRequest<Inline>

§

impl<Inline> Freeze for SpawnRequest<Inline>
where Inline: Freeze,

§

impl<Inline> Send for SpawnRequest<Inline>
where Inline: Send,

§

impl<Inline> Unpin for SpawnRequest<Inline>
where Inline: Unpin,

§

impl<Inline> UnsafeUnpin for SpawnRequest<Inline>
where Inline: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.