Skip to main content

RuntimeRequest

Enum RuntimeRequest 

Source
pub enum RuntimeRequest {
    Spawn {
        callable: Value,
        continuation: Box<dyn NativeContinuation>,
    },
    CancelPromise {
        promise: PromiseId,
        continuation: Box<dyn NativeContinuation>,
    },
    CreateChannel {
        capacity: usize,
        continuation: Box<dyn NativeContinuation>,
    },
    ChannelOp {
        channel: ChannelId,
        operation: ChannelOperation,
        continuation: Box<dyn NativeContinuation>,
    },
    CreateSettledPromise {
        outcome: TaskOutcome,
        continuation: Box<dyn NativeContinuation>,
    },
    InspectPromise {
        promise: PromiseId,
        continuation: Box<dyn NativeContinuation>,
    },
    PromiseSetWait {
        wait: PromiseSetWait,
        continuation: Box<dyn NativeContinuation>,
    },
    OriginBarrier {
        continuation: Box<dyn NativeContinuation>,
    },
    CreateResourceGate {
        continuation: Box<dyn NativeContinuation>,
    },
    ReleaseResourceGate {
        gate: ResourceGateId,
        continuation: Box<dyn NativeContinuation>,
    },
    CloseResourceGate {
        gate: ResourceGateId,
        continuation: Box<dyn NativeContinuation>,
    },
}

Variants§

§

Spawn

Fields

§callable: Value
§continuation: Box<dyn NativeContinuation>
§

CancelPromise

Fields

§promise: PromiseId
§continuation: Box<dyn NativeContinuation>
§

CreateChannel

Fields

§capacity: usize
§continuation: Box<dyn NativeContinuation>
§

ChannelOp

Fields

§channel: ChannelId
§continuation: Box<dyn NativeContinuation>
§

CreateSettledPromise

Fields

§outcome: TaskOutcome
§continuation: Box<dyn NativeContinuation>
§

InspectPromise

Fields

§promise: PromiseId
§continuation: Box<dyn NativeContinuation>
§

PromiseSetWait

Fields

§continuation: Box<dyn NativeContinuation>
§

OriginBarrier

Fields

§continuation: Box<dyn NativeContinuation>
§

CreateResourceGate

Allocate a fresh ResourceGateId — a per-handle mutual-exclusion slot with a FIFO waiter queue. A checkout-style stdlib module (sqlite, kv, proc, pty, serial, stream) creates one gate per resource handle when the handle is opened, then acquires it via WaitKind::ResourceSlot before each offloaded op and releases it via RuntimeRequest::ReleaseResourceGate when the op completes. The continuation receives RuntimeResponse::ResourceGate.

Fields

§continuation: Box<dyn NativeContinuation>
§

ReleaseResourceGate

Release ownership of a previously-acquired resource gate, waking the FIFO head waiter (if any) so exactly one queued acquirer proceeds. The continuation resumes with RuntimeResponse::Value(nil).

Fields

§continuation: Box<dyn NativeContinuation>
§

CloseResourceGate

Close a resource gate: fail every parked waiter with a structured “gate closed” error and drop the gate record. Used when a handle is closed/tombstoned so queued acquirers fail fast rather than hang.

Fields

§continuation: Box<dyn NativeContinuation>

Trait Implementations§

Source§

impl Trace for RuntimeRequest

Source§

fn trace(&self, sink: &mut dyn FnMut(GcEdge<'_>)) -> bool

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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, <T as TryFrom<U>>::Error>

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.