pub struct App { /* private fields */ }Expand description
Root runtime and owner of every persistent plugin registration.
Implementations§
Source§impl App
impl App
pub fn new() -> Self
pub fn context(&self) -> Context
pub fn is_started(&self) -> bool
Sourcepub async fn install<P: Plugin>(
&self,
plugin: P,
config: P::Config,
) -> Result<PluginHandle>
pub async fn install<P: Plugin>( &self, plugin: P, config: P::Config, ) -> Result<PluginHandle>
Registers a plugin and performs its first reconciliation.
Missing required services produce a suspended handle, not an error. The same registration is automatically reactivated when declared service generations appear, disappear, or change.
pub async fn install_erased( &self, plugin: Arc<dyn ErasedPlugin>, config: ErasedConfig, ) -> Result<PluginHandle>
pub async fn start(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for App
impl !RefUnwindSafe for App
impl !UnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin 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