Struct bevy_app::AppBuilder[][src]

pub struct AppBuilder {
    pub app: App,
}

Configure Apps using the builder pattern

Fields

app: App

Implementations

impl AppBuilder[src]

pub fn empty() -> AppBuilder[src]

pub fn run(&mut self)[src]

pub fn world(&mut self) -> &World[src]

pub fn world_mut(&mut self) -> &mut World[src]

pub fn set_world(&mut self, world: World) -> &mut Self[src]

pub fn add_stage<S: Stage>(
    &mut self,
    label: impl StageLabel,
    stage: S
) -> &mut Self
[src]

pub fn add_stage_after<S: Stage>(
    &mut self,
    target: impl StageLabel,
    label: impl StageLabel,
    stage: S
) -> &mut Self
[src]

pub fn add_stage_before<S: Stage>(
    &mut self,
    target: impl StageLabel,
    label: impl StageLabel,
    stage: S
) -> &mut Self
[src]

pub fn add_startup_stage<S: Stage>(
    &mut self,
    label: impl StageLabel,
    stage: S
) -> &mut Self
[src]

pub fn add_startup_stage_after<S: Stage>(
    &mut self,
    target: impl StageLabel,
    label: impl StageLabel,
    stage: S
) -> &mut Self
[src]

pub fn add_startup_stage_before<S: Stage>(
    &mut self,
    target: impl StageLabel,
    label: impl StageLabel,
    stage: S
) -> &mut Self
[src]

pub fn stage<T: Stage, F: FnOnce(&mut T) -> &mut T>(
    &mut self,
    label: impl StageLabel,
    func: F
) -> &mut Self
[src]

pub fn add_system(&mut self, system: impl Into<SystemDescriptor>) -> &mut Self[src]

pub fn add_system_set(&mut self, system_set: SystemSet) -> &mut Self[src]

pub fn add_system_to_stage(
    &mut self,
    stage_label: impl StageLabel,
    system: impl Into<SystemDescriptor>
) -> &mut Self
[src]

pub fn add_system_set_to_stage(
    &mut self,
    stage_label: impl StageLabel,
    system_set: SystemSet
) -> &mut Self
[src]

pub fn add_startup_system(
    &mut self,
    system: impl Into<SystemDescriptor>
) -> &mut Self
[src]

pub fn add_startup_system_to_stage(
    &mut self,
    stage_label: impl StageLabel,
    system: impl Into<SystemDescriptor>
) -> &mut Self
[src]

pub fn add_state<T>(&mut self, initial: T) -> &mut Self where
    T: Component + Debug + Clone + Eq + Hash
[src]

Adds a new State with the given initial value. This inserts a new State<T> resource and adds a new “driver” to CoreStage::Update. Each stage that uses State<T> for system run criteria needs a driver. If you need to use your state in a different stage, consider using Self::add_state_to_stage or manually adding State::get_driver to additional stages you need it in.

pub fn add_state_to_stage<T>(
    &mut self,
    stage: impl StageLabel,
    initial: T
) -> &mut Self where
    T: Component + Debug + Clone + Eq + Hash
[src]

Adds a new State with the given initial value. This inserts a new State<T> resource and adds a new “driver” to the given stage. Each stage that uses State<T> for system run criteria needs a driver. If you need to use your state in more than one stage, consider manually adding State::get_driver to the stages you need it in.

pub fn add_default_stages(&mut self) -> &mut Self[src]

pub fn add_event<T>(&mut self) -> &mut Self where
    T: Component
[src]

Setup the application to manage events of type T.

This is done by adding a Resource of type Events::<T>, and inserting a Events::<T>::update_system system into CoreStage::First.

pub fn insert_resource<T>(&mut self, resource: T) -> &mut Self where
    T: Component
[src]

Inserts a resource to the current App and overwrites any resource previously added of the same type.

pub fn insert_non_send_resource<T>(&mut self, resource: T) -> &mut Self where
    T: 'static, 
[src]

pub fn init_resource<R>(&mut self) -> &mut Self where
    R: FromWorld + Send + Sync + 'static, 
[src]

pub fn init_non_send_resource<R>(&mut self) -> &mut Self where
    R: FromWorld + 'static, 
[src]

pub fn set_runner(&mut self, run_fn: impl Fn(App) + 'static) -> &mut Self[src]

pub fn add_plugin<T>(&mut self, plugin: T) -> &mut Self where
    T: Plugin
[src]

pub fn add_plugins<T: PluginGroup>(&mut self, group: T) -> &mut Self[src]

pub fn add_plugins_with<T, F>(&mut self, group: T, func: F) -> &mut Self where
    T: PluginGroup,
    F: FnOnce(&mut PluginGroupBuilder) -> &mut PluginGroupBuilder
[src]

pub fn register_component(
    &mut self,
    descriptor: ComponentDescriptor
) -> &mut Self
[src]

Registers a new component using the given ComponentDescriptor. Components do not need to be manually registered. This just provides a way to override default configuration. Attempting to register a component with a type that has already been used by World will result in an error.

See World::register_component

pub fn register_type<T: GetTypeRegistration>(&mut self) -> &mut Self[src]

Trait Implementations

impl Default for AppBuilder[src]

Auto Trait Implementations

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>,