Trait SingletonProvider

Source
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§

Source

type Output: 'static

Source

type Error: Into<Error>

Required Methods§

Source

fn service() -> Result<&'static mut Self::Output, Self::Error>

Source

fn get_name(&self) -> &'static str

Source

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.

Implementors§