pub trait Resident<A: Application>: Send + 'static {
type Error: Debug + Display + Send + Sync + 'static;
// Required methods
fn run(
&mut self,
context: Service<A>,
) -> impl Future<Output = Result<(), Fault<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: Service<A>, ) -> impl Future<Output = Result<(), Fault<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".