pub trait InstanceTrait:
Any
+ Send
+ Sync {
type Error: ErrorTrait;
// Required method
fn register<'life0, 'async_trait>(
_: &'life0 Container,
) -> Pin<Box<dyn Future<Output = Result<Self, ContainerError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sized + 'async_trait;
// Provided methods
fn name() -> String { ... }
fn boot<'async_trait>( ) -> Pin<Box<dyn Future<Output = Result<(), ContainerError>> + Send + 'async_trait>>
where Self: Sized + 'async_trait { ... }
fn cleanup() -> Result<(), ContainerError> { ... }
fn facade() -> &'static Self
where Self: Sized { ... }
}
Required Associated Types§
type Error: ErrorTrait
Required Methods§
fn register<'life0, 'async_trait>(
_: &'life0 Container,
) -> Pin<Box<dyn Future<Output = Result<Self, ContainerError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sized + 'async_trait,
Provided Methods§
fn name() -> String
fn boot<'async_trait>() -> Pin<Box<dyn Future<Output = Result<(), ContainerError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
fn cleanup() -> Result<(), ContainerError>
fn facade() -> &'static Selfwhere
Self: Sized,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.