Skip to main content

EngineConfig

Trait EngineConfig 

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

    // 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, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Engine<K, V, P>>, Error>> + Send>>

Build the engine with the given configurations.

Provided Methods§

Source

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

Box the config.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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