pub trait VmFunction<'vm> {
    // Required method
    fn unpack_and_call(&self, vm: &'vm Thread) -> Status;
}
Expand description

Trait which abstracts over types which can be called by being pulling the arguments it needs from the virtual machine’s stack

Required Methods§

source

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

Implementations on Foreign Types§

source§

impl<'vm, 's, T> VmFunction<'vm> for &'s T
where T: VmFunction<'vm> + ?Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, C, D, E, F, G, R> VmFunction<'vm> for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, C: Getable<'vm, 'vm> + 'vm, D: Getable<'vm, 'vm> + 'vm, E: Getable<'vm, 'vm> + 'vm, F: Getable<'vm, 'vm> + 'vm, G: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, C, D, E, F, G, R> VmFunction<'vm> for dyn Fn(A, B, C, D, E, F, G) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, C: Getable<'vm, 'vm> + 'vm, D: Getable<'vm, 'vm> + 'vm, E: Getable<'vm, 'vm> + 'vm, F: Getable<'vm, 'vm> + 'vm, G: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, C, D, E, F, R> VmFunction<'vm> for fn(_: A, _: B, _: C, _: D, _: E, _: F) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, C: Getable<'vm, 'vm> + 'vm, D: Getable<'vm, 'vm> + 'vm, E: Getable<'vm, 'vm> + 'vm, F: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, C, D, E, F, R> VmFunction<'vm> for dyn Fn(A, B, C, D, E, F) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, C: Getable<'vm, 'vm> + 'vm, D: Getable<'vm, 'vm> + 'vm, E: Getable<'vm, 'vm> + 'vm, F: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, C, D, E, R> VmFunction<'vm> for fn(_: A, _: B, _: C, _: D, _: E) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, C: Getable<'vm, 'vm> + 'vm, D: Getable<'vm, 'vm> + 'vm, E: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, C, D, E, R> VmFunction<'vm> for dyn Fn(A, B, C, D, E) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, C: Getable<'vm, 'vm> + 'vm, D: Getable<'vm, 'vm> + 'vm, E: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, C, D, R> VmFunction<'vm> for fn(_: A, _: B, _: C, _: D) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, C: Getable<'vm, 'vm> + 'vm, D: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, C, D, R> VmFunction<'vm> for dyn Fn(A, B, C, D) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, C: Getable<'vm, 'vm> + 'vm, D: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, C, R> VmFunction<'vm> for fn(_: A, _: B, _: C) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, C: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, C, R> VmFunction<'vm> for dyn Fn(A, B, C) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, C: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, R> VmFunction<'vm> for fn(_: A, _: B) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, B, R> VmFunction<'vm> for dyn Fn(A, B) -> R
where A: Getable<'vm, 'vm> + 'vm, B: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, R> VmFunction<'vm> for fn(_: A) -> R
where A: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, A, R> VmFunction<'vm> for dyn Fn(A) -> R
where A: Getable<'vm, 'vm> + 'vm, R: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <R as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, F> VmFunction<'vm> for Box<F>
where F: VmFunction<'vm> + ?Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, R> VmFunction<'vm> for fn() -> IO<R>
where R: AsyncPushable<'vm> + VmType + 'vm, IO<R>: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <IO<R> as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

source§

impl<'vm, R> VmFunction<'vm> for dyn Fn() -> IO<R>
where R: AsyncPushable<'vm> + VmType + 'vm, IO<R>: AsyncPushable<'vm> + VmType + 'vm, R::Type: Sized, <IO<R> as VmType>::Type: Sized,

source§

fn unpack_and_call(&self, vm: &'vm Thread) -> Status

Implementors§