Attribute Macro panda_macros::init
source · #[init]
Expand description
(Required Callback) Called when the plugin is being uninitialized
Example
use panda::PluginHandle;
#[panda::init]
fn start(_: &mut PluginHandle) {
println!("Plugin started up!");
}
Allowed Return Types
()
: plugin load always succeedsbool
: plugin load is aborted iffalse
is returnedResult<T, E>
: plugin load is aborted onErr
, prints the error beforehandi32
: plugin load succeeds if0
is returned, otherwise abort