Skip to main content

SimilarityProviderType

Trait SimilarityProviderType 

Source
pub trait SimilarityProviderType: Sync + 'static {
    type SimilarityProvider: SimilarityProvider;

    const NAME: &'static str;
    const DESCRIPTION: &'static str;

    // Required methods
    fn create_provider(&self, settings: &Settings) -> Self::SimilarityProvider;
    fn default_settings(&self) -> Option<Ref<Settings>>;
}
Expand description

Creates similarity providers with the given settings.

Required Associated Constants§

Source

const NAME: &'static str

The provider name shown to users.

Source

const DESCRIPTION: &'static str

A short description of the provider.

Required Associated Types§

Required Methods§

Source

fn create_provider(&self, settings: &Settings) -> Self::SimilarityProvider

Creates a provider with the given settings.

Source

fn default_settings(&self) -> Option<Ref<Settings>>

Returns the settings used to configure new providers, if any.

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§