pub struct App { /* private fields */ }
Expand description
Running Applications
Implementations§
Trait Implementations§
Source§impl ComponentRegistry for App
impl ComponentRegistry for App
Source§fn get_component_ref<T>(&self) -> Option<ComponentRef<T>>
fn get_component_ref<T>(&self) -> Option<ComponentRef<T>>
Get the component reference of the specified type
Source§fn get_component<T>(&self) -> Option<T>
fn get_component<T>(&self) -> Option<T>
Get the component of the specified type
Source§fn has_component<T>(&self) -> bool
fn has_component<T>(&self) -> bool
Is there a component of the specified type in the registry?
Source§fn get_expect_component_ref<T>(&self) -> ComponentRef<T>
fn get_expect_component_ref<T>(&self) -> ComponentRef<T>
Get the component reference of the specified type.
If the component does not exist, it will panic.
Source§fn try_get_component_ref<T>(&self) -> Result<ComponentRef<T>>
fn try_get_component_ref<T>(&self) -> Result<ComponentRef<T>>
Get the component reference of the specified type.
If the component does not exist, it will return AppError::ComponentNotExist.
Source§fn get_expect_component<T>(&self) -> T
fn get_expect_component<T>(&self) -> T
Get the component of the specified type.
If the component does not exist, it will panic.
Source§impl ConfigRegistry for App
impl ConfigRegistry for App
Source§fn get_config<T>(&self) -> Result<T>where
T: DeserializeOwned + Configurable,
fn get_config<T>(&self) -> Result<T>where
T: DeserializeOwned + Configurable,
Get the configuration items according to the Configurable’s
config_prefix
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