MakeShared

Trait MakeShared 

Source
pub trait MakeShared<Args> {
    type Backend;
    type Config;
    type MakeError;

    // Required method
    fn make_shared_with_config(
        &mut self,
        config: Self::Config,
    ) -> Result<Self::Backend, Self::MakeError>;

    // Provided method
    fn make_shared(&mut self) -> Result<Self::Backend, Self::MakeError>
       where Self::Config: Default { ... }
}
Expand description

Trait for creating shared backend instances

Required Associated Types§

Source

type Backend

The backend type to be shared

Source

type Config

The Config for the backend

Source

type MakeError

The error returned if the backend cant be shared

Required Methods§

Source

fn make_shared_with_config( &mut self, config: Self::Config, ) -> Result<Self::Backend, Self::MakeError>

Returns the backend with config

Provided Methods§

Source

fn make_shared(&mut self) -> Result<Self::Backend, Self::MakeError>
where Self::Config: Default,

Returns the backend to be shared

Implementors§