Skip to main content

ServiceInstance

Trait ServiceInstance 

Source
pub trait ServiceInstance: Send {
    // Required methods
    fn run(
        &mut self,
        context: ExecutionContext,
    ) -> Pin<Box<dyn Future<Output = Result<(), ServingError>> + Send + '_>>;
    fn stop(
        &mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), ServingError>> + Send + '_>>;
    fn cleanup(
        &mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), ServingError>> + Send + '_>>;
}

Required Methods§

Source

fn run( &mut self, context: ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<(), ServingError>> + Send + '_>>

Source

fn stop( &mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ServingError>> + Send + '_>>

Source

fn cleanup( &mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ServingError>> + Send + '_>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§