Trait VmFunction

Source
pub trait VmFunction<Aux> {
    // Required method
    fn call(&self, vm: &mut Vm<'_, Aux>) -> Result<Value, ExecutionErrorPayload>;
}
Expand description

Objects that can act as Cao-Lang functions

Required Methods§

Source

fn call(&self, vm: &mut Vm<'_, Aux>) -> Result<Value, ExecutionErrorPayload>

Implementations on Foreign Types§

Source§

impl<Aux, T1, T2> VmFunction<Aux> for fn(&mut Vm<'_, Aux>, T1, T2) -> Result<Value, ExecutionErrorPayload>
where T1: TryFrom<Value>, T2: TryFrom<Value>,

Source§

fn call(&self, vm: &mut Vm<'_, Aux>) -> Result<Value, ExecutionErrorPayload>

Source§

impl<Aux, T1, T2, T3> VmFunction<Aux> for fn(&mut Vm<'_, Aux>, T1, T2, T3) -> Result<Value, ExecutionErrorPayload>
where T1: TryFrom<Value>, T2: TryFrom<Value>, T3: TryFrom<Value>,

Source§

fn call(&self, vm: &mut Vm<'_, Aux>) -> Result<Value, ExecutionErrorPayload>

Source§

impl<Aux, T1, T2, T3, T4> VmFunction<Aux> for fn(&mut Vm<'_, Aux>, T1, T2, T3, T4) -> Result<Value, ExecutionErrorPayload>
where T1: TryFrom<Value>, T2: TryFrom<Value>, T3: TryFrom<Value>, T4: TryFrom<Value>,

Source§

fn call(&self, vm: &mut Vm<'_, Aux>) -> Result<Value, ExecutionErrorPayload>

Implementors§

Source§

impl<Aux, F> VmFunction<Aux> for F
where F: Fn(&mut Vm<'_, Aux>) -> Result<Value, ExecutionErrorPayload>,

Source§

impl<Aux, T1> VmFunction<Aux> for VmFunction1<Aux, T1>
where T1: TryFrom<Value>,