Trait red4ext_rs::Plugin

source ·
pub trait Plugin {
    const NAME: &'static U16CStr;
    const AUTHOR: &'static U16CStr;
    const VERSION: SemVer;
    const SDK: SdkVersion = SdkVersion::LATEST;
    const RUNTIME: RuntimeVersion = RuntimeVersion::RUNTIME_INDEPENDENT;
    const API_VERSION: ApiVersion = ApiVersion::LATEST;

    // Provided methods
    fn exports() -> impl Exportable { ... }
    fn on_init(_env: &SdkEnv) { ... }
}
Expand description

A definition of a RED4ext plugin.

Required Associated Constants§

source

const NAME: &'static U16CStr

The name of the plugin.

source

const AUTHOR: &'static U16CStr

The author of the plugin.

source

const VERSION: SemVer

The version of the plugin.

Provided Associated Constants§

source

const SDK: SdkVersion = SdkVersion::LATEST

The RED4ext SDK version the plugin was built with.

source

const RUNTIME: RuntimeVersion = RuntimeVersion::RUNTIME_INDEPENDENT

The version of the game the plugin is compatible with.

source

const API_VERSION: ApiVersion = ApiVersion::LATEST

The RED4ext API version.

Provided Methods§

source

fn exports() -> impl Exportable

A list of definitions to be exported automatically when the plugin is loaded. This can be used to define classes and functions that will available to use in the game. See the exports! macro for more information.

source

fn on_init(_env: &SdkEnv)

A function that is called when the plugin is initialized.

Object Safety§

This trait is not object safe.

Implementors§