Trait product_os_capabilities::Service

source ·
pub trait Service: Send + Sync + Any {
Show 15 methods // Required methods fn register<'life0, 'async_trait>( &'life0 self, service: Arc<dyn Service>, ) -> Pin<Box<dyn Future<Output = RegistryService> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn register_mut<'life0, 'async_trait>( &'life0 self, service: Arc<Mutex<dyn Service>>, ) -> Pin<Box<dyn Future<Output = RegistryService> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn identifier(&self) -> String; fn key(&self) -> String; fn is_enabled(&self) -> bool; fn is_active(&self) -> bool; fn status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn start<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stop<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn restart<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn start_mut<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stop_mut<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn restart_mut<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn init_service<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn init_service_mut<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... }
}

Required Methods§

source

fn register<'life0, 'async_trait>( &'life0 self, service: Arc<dyn Service>, ) -> Pin<Box<dyn Future<Output = RegistryService> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn register_mut<'life0, 'async_trait>( &'life0 self, service: Arc<Mutex<dyn Service>>, ) -> Pin<Box<dyn Future<Output = RegistryService> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn identifier(&self) -> String

source

fn key(&self) -> String

source

fn is_enabled(&self) -> bool

source

fn is_active(&self) -> bool

source

fn status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn start<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn stop<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn restart<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn start_mut<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn stop_mut<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn restart_mut<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

source

fn init_service<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn init_service_mut<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations§

source§

impl dyn Service

source

pub fn is<T: Service>(&self) -> bool

Returns true if the boxed type is the same as T

source

pub fn downcast_ref<T: Service>(&self) -> Option<&T>

Returns some reference to the boxed value if it is of type T, or None if it isn’t.

source

pub unsafe fn downcast_ref_unchecked<T: Service>(&self) -> &T

Returns a reference to the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

source

pub fn downcast_mut<T: Service>(&mut self) -> Option<&mut T>

Returns some mutable reference to the boxed value if it is of type T, or None if it isn’t.

source

pub unsafe fn downcast_mut_unchecked<T: Service>(&mut self) -> &mut T

Returns a mutable reference to the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

source§

impl dyn Service

source

pub fn downcast<T: Service>(self: Box<Self>) -> Result<Box<T>, Box<Self>>

Returns the boxed value if it is of type T, or Err(Self) if it isn’t.

source

pub unsafe fn downcast_unchecked<T: Service>(self: Box<Self>) -> Box<T>

Returns the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

Implementors§