Skip to main content

Application

Struct Application 

Source
pub struct Application(/* private fields */);
Expand description

Application, clone is cheap.

Implementations§

Source§

impl Application

Source

pub fn builder() -> ApplicationBuilder

Source

pub fn global() -> Application

Source

pub fn set_global(application: Application)

Source

pub async fn shutdown()

Source

pub async fn await_shutdown() -> bool

Source

pub async fn is_shutdown(&self) -> bool

Source

pub async fn shutdown_recv(&self) -> ShutdownRecv

Source

pub fn config_registry(&self) -> &FusionConfigRegistry

Source

pub fn get_component_arc<T>(&self) -> ComponentResult<ComponentArc<T>>
where T: Any + Send + Sync,

Get the component reference of the specified type

Source

pub fn component_arc<T>(&self) -> ComponentArc<T>
where T: Any + Send + Sync,

Source

pub fn get_component_ref_by_name<T>( &self, component_name: &str, ) -> ComponentResult<ComponentArc<T>>
where T: Any + Send + Sync,

Source

pub fn component<T>(&self) -> T
where T: Clone + Send + Sync + 'static,

Source

pub fn get_component<T>(&self) -> ComponentResult<T>
where T: Clone + Send + Sync + 'static,

Get the component of the specified type

Source

pub fn get_component_names(&self) -> Vec<String>

Get all built components. The return value is the full crate path of all components

Source

pub fn add_component<T>(&self, component: T)
where T: Clone + Any + Send + Sync,

Source

pub fn fusion_setting(&self) -> Arc<FusionSetting> ⓘ

Source

pub fn underlying_config(&self) -> Arc<Config> ⓘ

Get ::config::Config Instance

Source

pub fn start_time(&self) -> &OffsetDateTime

Trait Implementations§

Source§

impl Clone for Application

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ConfigRegistry for Application

Source§

fn get_config<T>(&self) -> ConfigureResult<T>

Get the configuration items according to the Configurable’s config_prefix
Source§

fn get_config_by_path<T>(&self, path: &str) -> ConfigureResult<T>

Source§

impl Display for Application

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V