Skip to main content

Factory

Trait Factory 

Source
pub trait Factory<T: Translator>: Unordered + Sized {
    // Required method
    fn new(ctx: impl Metrics, translator: T) -> Self;
}
Expand description

A trait for index types that can be constructed from a metrics context and translator.

Required Methods§

Source

fn new(ctx: impl Metrics, translator: T) -> Self

Create a new index with the given metrics context and translator.

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§

Source§

impl<T: Translator, V: Eq + Send + Sync> Factory<T> for commonware_storage::index::ordered::Index<T, V>

Source§

impl<T: Translator, V: Eq + Send + Sync> Factory<T> for commonware_storage::index::unordered::Index<T, V>

Source§

impl<T: Translator, V: Eq + Send + Sync, const P: usize> Factory<T> for commonware_storage::index::partitioned::ordered::Index<T, V, P>

Source§

impl<T: Translator, V: Eq + Send + Sync, const P: usize> Factory<T> for commonware_storage::index::partitioned::unordered::Index<T, V, P>