Skip to main content

Interop

Trait Interop 

Source
pub trait Interop {
    // Required methods
    fn mutator(&mut self) -> &mut Mutator;
    fn call_method(
        &mut self,
        recv: Value,
        name: Sym,
        args: &[Value],
    ) -> RtResult<Option<Value>>;
}
Expand description

Calls back into the VM for operations defined in Catallaxy code.

Required Methods§

Source

fn mutator(&mut self) -> &mut Mutator

Source

fn call_method( &mut self, recv: Value, name: Sym, args: &[Value], ) -> RtResult<Option<Value>>

Calls method name on recv if its class defines it (not interface defaults). Returns Ok(None) when the class has no such method.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§