[][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, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> InstFn<(Instance, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    A: UnsafeFromValue,
    B: UnsafeFromValue,
    C: UnsafeFromValue,
    D: UnsafeFromValue,
    E: UnsafeFromValue,
    F: UnsafeFromValue,
    G: UnsafeFromValue,
    H: UnsafeFromValue,
    I: UnsafeFromValue,
    J: UnsafeFromValue,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> InstFn<(Instance, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    B: UnsafeFromValue,
    C: UnsafeFromValue,
    D: UnsafeFromValue,
    E: UnsafeFromValue,
    F: UnsafeFromValue,
    G: UnsafeFromValue,
    H: UnsafeFromValue,
    I: UnsafeFromValue,
    J: UnsafeFromValue,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, C, D, E, F, G, H, I, J, K, L, M, N, O, P> InstFn<(Instance, C, D, E, F, G, H, I, J, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, C, D, E, F, G, H, I, J, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    C: UnsafeFromValue,
    D: UnsafeFromValue,
    E: UnsafeFromValue,
    F: UnsafeFromValue,
    G: UnsafeFromValue,
    H: UnsafeFromValue,
    I: UnsafeFromValue,
    J: UnsafeFromValue,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, D, E, F, G, H, I, J, K, L, M, N, O, P> InstFn<(Instance, D, E, F, G, H, I, J, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, D, E, F, G, H, I, J, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    D: UnsafeFromValue,
    E: UnsafeFromValue,
    F: UnsafeFromValue,
    G: UnsafeFromValue,
    H: UnsafeFromValue,
    I: UnsafeFromValue,
    J: UnsafeFromValue,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, E, F, G, H, I, J, K, L, M, N, O, P> InstFn<(Instance, E, F, G, H, I, J, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, E, F, G, H, I, J, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    E: UnsafeFromValue,
    F: UnsafeFromValue,
    G: UnsafeFromValue,
    H: UnsafeFromValue,
    I: UnsafeFromValue,
    J: UnsafeFromValue,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, F, G, H, I, J, K, L, M, N, O, P> InstFn<(Instance, F, G, H, I, J, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, F, G, H, I, J, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    F: UnsafeFromValue,
    G: UnsafeFromValue,
    H: UnsafeFromValue,
    I: UnsafeFromValue,
    J: UnsafeFromValue,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, G, H, I, J, K, L, M, N, O, P> InstFn<(Instance, G, H, I, J, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, G, H, I, J, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    G: UnsafeFromValue,
    H: UnsafeFromValue,
    I: UnsafeFromValue,
    J: UnsafeFromValue,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, H, I, J, K, L, M, N, O, P> InstFn<(Instance, H, I, J, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, H, I, J, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    H: UnsafeFromValue,
    I: UnsafeFromValue,
    J: UnsafeFromValue,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, I, J, K, L, M, N, O, P> InstFn<(Instance, I, J, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, I, J, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    I: UnsafeFromValue,
    J: UnsafeFromValue,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, J, K, L, M, N, O, P> InstFn<(Instance, J, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, J, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    J: UnsafeFromValue,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, K, L, M, N, O, P> InstFn<(Instance, K, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, K, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    K: UnsafeFromValue,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, L, M, N, O, P> InstFn<(Instance, L, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, L, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    L: UnsafeFromValue,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, M, N, O, P> InstFn<(Instance, M, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, M, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    M: UnsafeFromValue,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, N, O, P> InstFn<(Instance, N, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, N, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    N: UnsafeFromValue,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, O, P> InstFn<(Instance, O, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, O, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    O: UnsafeFromValue,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

impl<Func, Return, Instance, P> InstFn<(Instance, P)> for Func where
    Func: 'static + Copy + Send + Sync + Fn(Instance, P) -> Return,
    Return: ToValue,
    Instance: UnsafeFromValue + ValueType,
    P: UnsafeFromValue
[src]

type Instance = Instance

type Return = Return

Loading content...