pub trait InstanceTrait:
Any
+ Send
+ Sync {
// Required method
fn register(container: &Container) -> Result<Self, ContainerError>
where Self: Sized;
// Provided methods
fn name() -> String { ... }
fn boot() -> Result<(), ContainerError>
where Self: Sized { ... }
fn cleanup() -> Result<(), ContainerError> { ... }
fn facade() -> &'static Self
where Self: Sized { ... }
}Required Methods§
Provided Methods§
fn name() -> String
fn boot() -> Result<(), ContainerError>where
Self: Sized,
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.