pub trait Resident<A: Application>: Send + 'static {
type Error: Error + Send + Sync + 'static;
// Required methods
fn run(
&mut self,
context: ServiceContext<A>,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn cleanup(
&mut self,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
// Provided method
fn stop(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send { ... }
}Required Associated Types§
Required Methods§
fn run( &mut self, context: ServiceContext<A>, ) -> impl Future<Output = Result<(), Self::Error>> + Send
fn cleanup(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".