NativeValue

Trait NativeValue 

Source
pub trait NativeValue {
    // Required method
    fn call_method(
        &self,
        vm: &mut VM,
        method_id: IdentifierId,
        args: Vec<Value>,
    ) -> NativeResult<Value>;

    // Provided methods
    fn operator_add(&self, vm: &mut VM, other: Value) -> NativeResult<Value> { ... }
    fn iterate(&self, vm: &mut VM) -> NativeResult<Value> { ... }
    fn iterator_next(&self, vm: &mut VM) -> NativeResult<Option<Value>> { ... }
}

Required Methods§

Source

fn call_method( &self, vm: &mut VM, method_id: IdentifierId, args: Vec<Value>, ) -> NativeResult<Value>

Provided Methods§

Source

fn operator_add(&self, vm: &mut VM, other: Value) -> NativeResult<Value>

Source

fn iterate(&self, vm: &mut VM) -> NativeResult<Value>

Source

fn iterator_next(&self, vm: &mut VM) -> NativeResult<Option<Value>>

Implementors§