Skip to main content

StoreFactory

Trait StoreFactory 

Source
pub trait StoreFactory: Send + Sync {
    // Required method
    fn build(&self) -> Stores;
}
Expand description

Builds an empty set of stores, once per check.

Any Fn() -> Stores implements it, so &Stores::in_memory or a closure that opens a fresh schema both work.

Required Methods§

Source

fn build(&self) -> Stores

Returns a set of stores with no records in it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F> StoreFactory for F
where F: Fn() -> Stores + Send + Sync,