[][src]Trait runestick::module::InstFn

pub trait InstFn<Args>: 'static + Copy + Send + Sync {
    type Instance;
    type Return;
    fn args() -> usize;
fn instance_value_type() -> Type;
fn instance_value_type_info() -> TypeInfo;
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 Return

The return type of the function.

Loading content...

Required methods

fn args() -> usize

Get the number of arguments.

fn instance_value_type() -> Type

Access the value type of the instance.

fn instance_value_type_info() -> TypeInfo

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 + ValueType
[src]

type Instance = Instance

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 + ValueType,
    A: UnsafeFromValue
[src]

type Instance = Instance

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 + ValueType,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

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 + ValueType,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

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 + ValueType,
    D: UnsafeFromValue,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

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 + ValueType,
    E: UnsafeFromValue,
    D: UnsafeFromValue,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

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 + ValueType,
    F: UnsafeFromValue,
    E: UnsafeFromValue,
    D: UnsafeFromValue,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

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 + ValueType,
    G: UnsafeFromValue,
    F: UnsafeFromValue,
    E: UnsafeFromValue,
    D: UnsafeFromValue,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

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 + ValueType,
    H: UnsafeFromValue,
    G: UnsafeFromValue,
    F: UnsafeFromValue,
    E: UnsafeFromValue,
    D: UnsafeFromValue,
    C: UnsafeFromValue,
    B: UnsafeFromValue,
    A: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

Loading content...