pub struct Application(/* private fields */);Expand description
Application, clone is cheap.
Implementations§
Source§impl Application
impl Application
pub fn builder() -> ApplicationBuilder
pub fn global() -> Application
pub fn set_global(application: Application)
pub async fn shutdown()
pub async fn await_shutdown() -> bool
pub async fn is_shutdown(&self) -> bool
pub async fn shutdown_recv(&self) -> ShutdownRecv
pub fn config_registry(&self) -> &FusionConfigRegistry
Sourcepub fn get_component_arc<T>(&self) -> ComponentResult<ComponentArc<T>>
pub fn get_component_arc<T>(&self) -> ComponentResult<ComponentArc<T>>
Get the component reference of the specified type
pub fn component_arc<T>(&self) -> ComponentArc<T>
pub fn get_component_ref_by_name<T>( &self, component_name: &str, ) -> ComponentResult<ComponentArc<T>>
pub fn component<T>(&self) -> T
Sourcepub fn get_component<T>(&self) -> ComponentResult<T>
pub fn get_component<T>(&self) -> ComponentResult<T>
Get the component of the specified type
Sourcepub fn get_component_names(&self) -> Vec<String>
pub fn get_component_names(&self) -> Vec<String>
Get all built components. The return value is the full crate path of all components
pub fn add_component<T>(&self, component: T)
pub fn fusion_setting(&self) -> Arc<FusionSetting> ⓘ
Sourcepub fn underlying_config(&self) -> Arc<Config> ⓘ
pub fn underlying_config(&self) -> Arc<Config> ⓘ
Get ::config::Config Instance
pub fn start_time(&self) -> &OffsetDateTime
Trait Implementations§
Source§impl Clone for Application
impl Clone for Application
Source§impl ConfigRegistry for Application
impl ConfigRegistry for Application
Source§fn get_config<T>(&self) -> ConfigureResult<T>where
T: DeserializeOwned + Configurable,
fn get_config<T>(&self) -> ConfigureResult<T>where
T: DeserializeOwned + Configurable,
Get the configuration items according to the Configurable’s
config_prefixfn get_config_by_path<T>(&self, path: &str) -> ConfigureResult<T>where
T: DeserializeOwned,
Auto Trait Implementations§
impl !RefUnwindSafe for Application
impl !UnwindSafe for Application
impl Freeze for Application
impl Send for Application
impl Sync for Application
impl Unpin for Application
impl UnsafeUnpin for Application
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