Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: 'static {
    // Required method
    fn build(&self, app: &mut App);
}
Expand description

A plugin encapsulates a self-contained piece of functionality that can be registered with an App.

Plugins are collected and built in App::build. A plugin’s build implementation can add resources, systems, and even other plugins.

Required Methods§

Source

fn build(&self, app: &mut App)

Register this plugin’s resources and systems with app.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§