bevy/crates/bevy_app/src/plugin.rs
Michael Dorst accfb33ab9 Fix doc_markdown lints in bevy_app (#3467)
#3457 adds the `doc_markdown` clippy lint, which checks doc comments to make sure code identifiers are escaped with backticks. This causes a lot of lint errors, so this is one of a number of PR's that will fix those lint errors one crate at a time.

This PR fixes lints in the `bevy_app` crate.
2021-12-30 09:08:19 +00:00

15 lines
445 B
Rust

use crate::App;
use std::any::Any;
/// A collection of Bevy App logic and configuration
///
/// Plugins configure an [`App`](crate::App). When an [`App`](crate::App) registers
/// a plugin, the plugin's [`Plugin::build`] function is run.
pub trait Plugin: Any + Send + Sync {
fn build(&self, app: &mut App);
fn name(&self) -> &str {
std::any::type_name::<Self>()
}
}
pub type CreatePlugin = unsafe fn() -> *mut dyn Plugin;