[][src]Trait runestick::InstFn

pub trait InstFn<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 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 info 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> InstFn<(Instance,)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ReflectValueType
[src]

type Instance = Instance

type Owned = <Instance as ReflectValueType>::Owned

type Return = Return

impl<Func, Return, Instance, A> InstFn<(Instance, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, A) -> Return,
    Return: 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> InstFn<(Instance, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, B, A) -> Return,
    Return: 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> InstFn<(Instance, C, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, C, B, A) -> Return,
    Return: 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> InstFn<(Instance, D, C, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, D, C, B, A) -> Return,
    Return: 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> InstFn<(Instance, E, D, C, B, A)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, E, D, C, B, A) -> Return,
    Return: 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> InstFn<(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: 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> InstFn<(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: 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> InstFn<(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: 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...