Struct arma_rs::Extension

source ·
pub struct Extension { /* private fields */ }
Expand description

Contains all the information about your extension This is used by the generated code to interface with Arma

Implementations§

Creates a new extension.

Examples found in repository?
examples/hello_world.rs (line 5)
4
5
6
7
8
9
10
fn init() -> Extension {
    Extension::build()
        .version("1.0.0".to_string())
        .command("hello", hello)
        .command("welcome", welcome)
        .finish()
}

Returns the version of the extension.

Returns if the extension can be called without any arguments. Example:

"my_ext" callExtension "my_func"

Called by generated code, do not call directly.

Get a context for interacting with Arma

Called by generated code, do not call directly.

Safety

This function is unsafe because it interacts with the C API.

Create a version of the extension that can be used in tests.

Called by generated code, do not call directly.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.