pub enum Request<'gc, C: CustomTypes<S>, S: System<C>> {
    Input {
        prompt: Option<Value<'gc, C, S>>,
    },
    Syscall {
        name: CompactString,
        args: Vec<Value<'gc, C, S>>,
    },
    Rpc {
        service: CompactString,
        rpc: CompactString,
        args: VecMap<CompactString, Value<'gc, C, S>, false>,
    },
    Property {
        prop: Property,
    },
    UnknownBlock {
        name: CompactString,
        args: Vec<Value<'gc, C, S>>,
    },
}
Expand description

A value-returning request issued from the runtime.

Variants§

§

Input

Fields

§prompt: Option<Value<'gc, C, S>>

Request input from the user. The prompt argument is either Some prompt to display, or None for no prompt.

§

Syscall

Fields

§args: Vec<Value<'gc, C, S>>

Performs a system call on the local hardware to access device resources.

§

Rpc

Fields

§args: VecMap<CompactString, Value<'gc, C, S>, false>

Requests the system to execute the given RPC.

§

Property

Fields

Request to get the current value of an entity property.

§

UnknownBlock

Fields

§args: Vec<Value<'gc, C, S>>

Request to run a block which was not known by the ast parser or bytecode compiler. This is typically used for implementing extension blocks in the VM, which cannot be handled otherwise.

Implementations§

source§

impl<'gc, C: CustomTypes<S>, S: System<C>> Request<'gc, C, S>

source

pub fn feature(&self) -> Feature

Gets the Feature associated with this request.

Auto Trait Implementations§

§

impl<'gc, C, S> !RefUnwindSafe for Request<'gc, C, S>

§

impl<'gc, C, S> !Send for Request<'gc, C, S>

§

impl<'gc, C, S> !Sync for Request<'gc, C, S>

§

impl<'gc, C, S> Unpin for Request<'gc, C, S>

§

impl<'gc, C, S> !UnwindSafe for Request<'gc, C, S>

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

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>,

§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more