Skip to main content

Factory

Trait Factory 

Source
pub trait Factory: Unordered + Sized {
    type Translator: Translator;

    // Required method
    fn new(ctx: impl Metrics, translator: Self::Translator) -> Self;
}
Expand description

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

Required Associated Types§

Source

type Translator: Translator

The translator used by this index.

Required Methods§

Source

fn new(ctx: impl Metrics, translator: Self::Translator) -> 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".

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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