Struct bevy_app::App[][src]

pub struct App {
    pub world: World,
    pub runner: Box<dyn Fn(App)>,
    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)>schedule: Schedule

Implementations

impl App[src]

pub fn build() -> AppBuilder[src]

pub fn update(&mut self)[src]

pub fn run(self)[src]

Trait Implementations

impl Default for App[src]

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> 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> From<T> for T[src]

impl<T> FromWorld for T where
    T: Default
[src]

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<V, T> VZip<V> for T where
    V: MultiLane<T>,