pub trait AddDaemonServiceExt {
// Required methods
fn add_daemon_service<T>(&mut self) -> &mut Self
where T: Service<Handle = Arc<T>> + Daemon + 'static;
fn has_daemon_service<T>(&self) -> bool
where T: Service<Handle = Arc<T>> + Daemon + 'static;
}Expand description
Required Methods§
Sourcefn add_daemon_service<T>(&mut self) -> &mut Self
fn add_daemon_service<T>(&mut self) -> &mut Self
Registers the Service T to be run as a daemon.
§Panics
Panics if T is already registered as a daemon service (its provider
plugin would be added twice); guard with
has_daemon_service when this
can happen. Building the App additionally panics if T is registered
both as a daemon service and as an instance via
AddDaemonExt::add_daemon.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".