mirror of
https://github.com/bevyengine/bevy
synced 2024-12-24 12:03:14 +00:00
accfb33ab9
#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.
15 lines
445 B
Rust
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;
|