pub trait SingletonProvider {
type Output: 'static;
type Error: Into<Error>;
// Required methods
fn service() -> Result<&'static mut Self::Output, Self::Error>;
fn get_name(&self) -> &'static str;
fn get_service(&self) -> Result<Self::Output, Self::Error>;
}
Required Associated Types§
Required Methods§
fn service() -> Result<&'static mut Self::Output, Self::Error>
fn get_name(&self) -> &'static str
fn get_service(&self) -> Result<Self::Output, Self::Error>
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.