Skip to main content

MiraFunction

Trait MiraFunction 

Source
pub trait MiraFunction: Any {
    // Required method
    fn call(
        &self,
        runtime: &mut Runtime,
        args: &[MiraValue],
    ) -> Result<MiraManageable>;

    // Provided method
    fn name(&self) -> &str { ... }
}
Expand description

A callable MiraScript function implementation.

Required Methods§

Source

fn call( &self, runtime: &mut Runtime, args: &[MiraValue], ) -> Result<MiraManageable>

Invoke the function.

Provided Methods§

Source

fn name(&self) -> &str

Return the function name shown in diagnostics and stack traces.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§