[][src]Trait runestick::AsyncInstFn

pub trait AsyncInstFn<Args>: 'static + Copy + Send + Sync {
    type Instance;
    type Owned;
    type Return;
    fn args() -> usize;
fn instance_value_type() -> ValueType;
fn instance_value_type_info() -> ValueTypeInfo;
fn fn_call(self, stack: &mut Stack, args: usize) -> Result<(), VmError>; }

Trait used to provide the async_inst_fn function.

Associated Types

type Instance

The type of the instance.

type Owned

The owned type of the instance.

type Return

The return type of the function.

Loading content...

Required methods

fn args() -> usize

Get the number of arguments.

fn instance_value_type() -> ValueType

Access the value type of the instance.

fn instance_value_type_info() -> ValueTypeInfo

Access the value type of the instance.

fn fn_call(self, stack: &mut Stack, args: usize) -> Result<(), VmError>

Perform the vm call.

Loading content...

Implementors

impl<Func, Return, Instance> AsyncInstFn<(Instance,)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance) -> Return,
    Return: Future,
    Return::Output: ToValue,
    Instance: UnsafeFromValue + ReflectValueType
[src]

type Instance = Instance

type Owned = <Instance as ReflectValueType>::Owned

type Return = Return

impl<Func, Return, Instance, A> AsyncInstFn<(Instance, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, A) -> Return,
    Return: Future,
    Return::Output: ToValue,
    Instance: UnsafeFromValue + ReflectValueType,
    A: UnsafeFromValue
[src]

type Instance = Instance

type Owned = <Instance as ReflectValueType>::Owned

type Return = Return

impl<Func, Return, Instance, B, A> AsyncInstFn<(Instance, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, B, A) -> Return,
    Return: Future,
    Return::Output: ToValue,
    Instance: UnsafeFromValue + ReflectValueType,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

type Owned = <Instance as ReflectValueType>::Owned

type Return = Return

impl<Func, Return, Instance, C, B, A> AsyncInstFn<(Instance, C, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, C, B, A) -> Return,
    Return: Future,
    Return::Output: ToValue,
    Instance: UnsafeFromValue + ReflectValueType,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

type Owned = <Instance as ReflectValueType>::Owned

type Return = Return

impl<Func, Return, Instance, D, C, B, A> AsyncInstFn<(Instance, D, C, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, D, C, B, A) -> Return,
    Return: Future,
    Return::Output: ToValue,
    Instance: UnsafeFromValue + ReflectValueType,
    D: UnsafeFromValue,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

type Owned = <Instance as ReflectValueType>::Owned

type Return = Return

impl<Func, Return, Instance, E, D, C, B, A> AsyncInstFn<(Instance, E, D, C, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, E, D, C, B, A) -> Return,
    Return: Future,
    Return::Output: ToValue,
    Instance: UnsafeFromValue + ReflectValueType,
    E: UnsafeFromValue,
    D: UnsafeFromValue,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

type Owned = <Instance as ReflectValueType>::Owned

type Return = Return

impl<Func, Return, Instance, F, E, D, C, B, A> AsyncInstFn<(Instance, F, E, D, C, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, F, E, D, C, B, A) -> Return,
    Return: Future,
    Return::Output: ToValue,
    Instance: UnsafeFromValue + ReflectValueType,
    F: UnsafeFromValue,
    E: UnsafeFromValue,
    D: UnsafeFromValue,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

type Owned = <Instance as ReflectValueType>::Owned

type Return = Return

impl<Func, Return, Instance, G, F, E, D, C, B, A> AsyncInstFn<(Instance, G, F, E, D, C, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, G, F, E, D, C, B, A) -> Return,
    Return: Future,
    Return::Output: ToValue,
    Instance: UnsafeFromValue + ReflectValueType,
    G: UnsafeFromValue,
    F: UnsafeFromValue,
    E: UnsafeFromValue,
    D: UnsafeFromValue,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

type Owned = <Instance as ReflectValueType>::Owned

type Return = Return

impl<Func, Return, Instance, H, G, F, E, D, C, B, A> AsyncInstFn<(Instance, H, G, F, E, D, C, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, H, G, F, E, D, C, B, A) -> Return,
    Return: Future,
    Return::Output: ToValue,
    Instance: UnsafeFromValue + ReflectValueType,
    H: UnsafeFromValue,
    G: UnsafeFromValue,
    F: UnsafeFromValue,
    E: UnsafeFromValue,
    D: UnsafeFromValue,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

type Owned = <Instance as ReflectValueType>::Owned

type Return = Return

Loading content...