[][src]Derive Macro runestick::Any

#[derive(Any)]
{
    // Attributes available to this derive:
    #[rune]
}

Macro to mark a value as external, which will implement all the appropriate traits.

This is required to support the external type as a type argument in a registered function.

#[rune(name = "..")] attribute

The name of a type defaults to its identifiers, so struct Foo {} would be given the name "Foo".

This can be overrided with the #[rune(name = "...")] attribute:

use runestick::Any;

#[derive(Any)]
#[rune(name = "Bar")]
struct Foo {
}

fn install() -> Result<runestick::Module, runestick::ContextError> {
    let mut module = runestick::Module::empty();
    module.ty::<Foo>()?;
    Ok(module)
}