Skip to main content

ServiceHandle

Trait ServiceHandle 

Source
pub trait ServiceHandle: Send {
    // Required methods
    fn service(&self) -> &'static str;
    fn shutdown<'async_trait>(
        self: Box<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<(), ShutdownError>> + Send + 'async_trait>>
       where Self: 'async_trait;
}

Required Methods§

Source

fn service(&self) -> &'static str

Source

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§