EngineConfig

Trait EngineConfig 

Source
pub trait EngineConfig<K, V, P>:
    Send
    + Sync
    + 'static
    + Debug{
    // Required method
    fn build(
        self: Box<Self>,
        ctx: EngineBuildContext,
    ) -> BoxFuture<'static, Result<Arc<dyn Engine<K, V, P>>>>;

    // Provided method
    fn boxed(self) -> Box<Self>
       where Self: Sized { ... }
}
Expand description

Disk cache engine config trait.

Required Methods§

Source

fn build( self: Box<Self>, ctx: EngineBuildContext, ) -> BoxFuture<'static, Result<Arc<dyn Engine<K, V, P>>>>

Build the engine with the given configurations.

Provided Methods§

Source

fn boxed(self) -> Box<Self>
where Self: Sized,

Box the config.

Trait Implementations§

Source§

impl<K, V, P> From<BlockEngineConfig<K, V, P>> for Box<dyn EngineConfig<K, V, P>>

Source§

fn from(builder: BlockEngineConfig<K, V, P>) -> Self

Converts to this type from the input type.

Implementors§

Source§

impl<K, V, P> EngineConfig<K, V, P> for BlockEngineConfig<K, V, P>