pub struct App { /* private fields */ }Implementations§
Source§impl App
impl App
Sourcepub fn shutdown(&mut self) -> ShutdownConfigBuilder<'_>
pub fn shutdown(&mut self) -> ShutdownConfigBuilder<'_>
Configure shutdown behavior
Sourcepub fn extract<T: FromApp>(&self) -> T
pub fn extract<T: FromApp>(&self) -> T
Extract a dependency from the App (convenience helper for Service::create)
pub fn add_module<M: Module>(&mut self, module: M) -> &mut Self
pub fn add_resource<T: Send + Sync + 'static>( &mut self, resource: T, ) -> &mut Self
pub fn add_resources<T: AddResources>(&mut self, resources: T) -> &mut Self
pub fn add_event<E: Clone + Send + 'static>(&mut self) -> &mut Self
pub fn add_events<T: AddEvents>(&mut self) -> &mut Self
pub fn event<E: Clone + Send + 'static>(&mut self) -> EventConfigBuilder<'_>
pub fn add_service<S: Service>(&mut self) -> ServiceConfigBuilder<'_>
pub fn add_services<T: AddServices>(&mut self) -> &mut Self
pub fn service<S: Service>(&mut self) -> ServiceConfigBuilder<'_>
Sourcepub fn add_system<F, Args>(
&mut self,
schedule: Schedule,
system: F,
) -> &mut Selfwhere
F: IntoSystem<Args>,
pub fn add_system<F, Args>(
&mut self,
schedule: Schedule,
system: F,
) -> &mut Selfwhere
F: IntoSystem<Args>,
Add a single system with the given schedule
Sourcepub fn add_systems<M, S>(&mut self, schedule: Schedule, systems: S) -> &mut Selfwhere
S: IntoSystemConfigs<M>,
pub fn add_systems<M, S>(&mut self, schedule: Schedule, systems: S) -> &mut Selfwhere
S: IntoSystemConfigs<M>,
Add multiple systems with the given schedule: add_systems(Schedule::Run, (sys1, sys2, sys3))
Sourcepub fn system<F, Args>(&mut self, _system: F) -> SystemConfigBuilder<'_>where
F: IntoSystem<Args>,
pub fn system<F, Args>(&mut self, _system: F) -> SystemConfigBuilder<'_>where
F: IntoSystem<Args>,
Configure a previously registered system