Macro resource

Source
macro_rules! resource {
    ($struct_name:ty, $env: ident) => { ... };
}
Expand description

Deprecated resource registration method

This macro will create a local impl Resource for the passed type and is thus incompatible with upcoming Rust language changes. Please implement the Resource trait directly and register it either using the resource_impl attribute or using the Env::register method:

fn on_load(env: Env) -> bool {
    env.register::<ResourceType>().is_ok()
}