pub trait NativeInstance: Send {
// Required methods
fn classify(
&self,
error: &(dyn Error + Send + Sync + 'static),
) -> FailureKind;
fn initialize(&mut self, context: ExecutionContext) -> ServiceFuture<'_, ()>;
fn run(
&mut self,
context: ExecutionContext,
) -> ServiceFuture<'_, ErasedResponse>;
fn stop(&mut self) -> ServiceFuture<'_, ()>;
fn cleanup(&mut self) -> ServiceFuture<'_, ()>;
fn transferred(&self) -> bool;
}Required Methods§
fn classify(&self, error: &(dyn Error + Send + Sync + 'static)) -> FailureKind
fn initialize(&mut self, context: ExecutionContext) -> ServiceFuture<'_, ()>
fn run( &mut self, context: ExecutionContext, ) -> ServiceFuture<'_, ErasedResponse>
fn stop(&mut self) -> ServiceFuture<'_, ()>
fn cleanup(&mut self) -> ServiceFuture<'_, ()>
fn transferred(&self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".