pub struct AppBuilder { /* private fields */ }Expand description
Builder for App
Implementations§
Source§impl AppBuilder
impl AppBuilder
Sourcepub fn new() -> AppBuilder
pub fn new() -> AppBuilder
Create a new AppBuilder
Sourcepub fn with_config(self, path: &'static str) -> AppBuilder
pub fn with_config(self, path: &'static str) -> AppBuilder
Set the application config
Sourcepub fn with_system<S>(self, sys: S) -> Self
pub fn with_system<S>(self, sys: S) -> Self
Register a system in the default gameplay stage (Stage::Update)
Sourcepub fn with_system_in_stage<S>(self, stage: Stage, sys: S) -> Self
pub fn with_system_in_stage<S>(self, stage: Stage, sys: S) -> Self
Register a system in a specific stage
Sourcepub fn with_system_deps<S>(self, sys: S, deps: &'static [&'static str]) -> Self
pub fn with_system_deps<S>(self, sys: S, deps: &'static [&'static str]) -> Self
Register a system with dependencies in the default gameplay stage
Sourcepub fn with_system_deps_in_stage<S>(
self,
stage: Stage,
sys: S,
deps: &'static [&'static str],
) -> Self
pub fn with_system_deps_in_stage<S>( self, stage: Stage, sys: S, deps: &'static [&'static str], ) -> Self
Register a system with dependencies in a specific stage
Sourcepub fn with_component<C: Component, F: ComponentFactory + Default + 'static>(
self,
) -> AppBuilder
pub fn with_component<C: Component, F: ComponentFactory + Default + 'static>( self, ) -> AppBuilder
Register a component in the ECS
Sourcepub fn with_plugin<C: Plugin + 'static + Send + Sync>(
self,
plugin: C,
) -> AppBuilder
pub fn with_plugin<C: Plugin + 'static + Send + Sync>( self, plugin: C, ) -> AppBuilder
Register a plugin
Sourcepub fn build(self) -> RuntimeResult<App>
pub fn build(self) -> RuntimeResult<App>
Builds an App
Trait Implementations§
Source§impl Default for AppBuilder
impl Default for AppBuilder
Source§fn default() -> AppBuilder
fn default() -> AppBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AppBuilder
impl !RefUnwindSafe for AppBuilder
impl !Send for AppBuilder
impl !Sync for AppBuilder
impl Unpin for AppBuilder
impl UnsafeUnpin for AppBuilder
impl !UnwindSafe for AppBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
Source§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
Source§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default and panics on an error case.