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§

Source§

impl<B, T> Plugin for AssetPlugin<B, T>
where B: 'static + Send + Sync, T: Asset<B>,

Source§

impl<B, T> Plugin for LazyResourcePlugin<B, T>
where B: 'static + Send + Sync, T: LazyResource<B>,

Source§

impl<B: Backend, W: PresentableWindow> Plugin for GraphicsPlugin<B, W>

Source§

impl<B: Backend> Plugin for RenderPlugin<B>

Source§

impl<W> Plugin for WindowPlugin<W>
where W: WindowRunner, W::Handle: 'static + Send + Sync + Clone,