pub struct App { /* private fields */ }Implementations§
Source§impl App
impl App
Sourcepub const DEFAULT_EVENT_CAPACITY: usize = 32usize
pub const DEFAULT_EVENT_CAPACITY: usize = 32usize
Default channel capacity for event buses.
Sourcepub fn shutdown(&mut self) -> ShutdownConfigBuilder<'_>
pub fn shutdown(&mut self) -> ShutdownConfigBuilder<'_>
Configure shutdown behavior
Sourcepub fn service_defaults(&mut self) -> ServiceConfigBuilder<'_>
pub fn service_defaults(&mut self) -> ServiceConfigBuilder<'_>
Configure default settings for all services
Sourcepub fn system_defaults(&mut self) -> SystemConfigBuilder<'_>
pub fn system_defaults(&mut self) -> SystemConfigBuilder<'_>
Configure default settings for all systems
Sourcepub fn event_defaults(&mut self) -> EventConfigBuilder<'_>
pub fn event_defaults(&mut self) -> EventConfigBuilder<'_>
Configure default settings for all events
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) -> EventConfigBuilder<'_>
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,
) -> SystemConfigBuilder<'_>where
F: IntoSystem<Args>,
pub fn add_system<F, Args>(
&mut self,
schedule: Schedule,
system: F,
) -> SystemConfigBuilder<'_>where
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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl !RefUnwindSafe for App
impl Send for App
impl !Sync for App
impl Unpin for App
impl !UnwindSafe for App
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more