Struct bevy::prelude::App[]

pub struct App {
    pub world: World,
    pub runner: Box<dyn Fn(App) + 'static, Global>,
    pub schedule: Schedule,
}

Containers of app logic and data

App store the ECS World, Resources, Schedule, and Executor. They also store the “run” function of the App, which by default executes the App schedule once. Apps are constructed using the builder pattern.

Example

Here is a simple “Hello World” Bevy app:


fn main() {
   App::build()
       .add_system(hello_world_system.system())
       .run();
}

fn hello_world_system() {
   println!("hello world");
}

Fields

world: Worldrunner: Box<dyn Fn(App) + 'static, Global>schedule: Schedule

Implementations

impl App

pub fn build() -> AppBuilder

pub fn update(&mut self)

pub fn run(self)

Trait Implementations

impl Default for App

Auto Trait Implementations

impl !RefUnwindSafe for App

impl !Send for App

impl !Sync for App

impl Unpin for App

impl !UnwindSafe for App

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> Downcast<T> for T

impl<T> From<T> for T[src]

impl<T> FromWorld for T where
    T: Default

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,