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§
Sourceconst DESCRIPTION: &'static str
const DESCRIPTION: &'static str
A short description of the provider.
Required Associated Types§
Required Methods§
Sourcefn create_provider(&self, settings: &Settings) -> Self::SimilarityProvider
fn create_provider(&self, settings: &Settings) -> Self::SimilarityProvider
Creates a provider with the given settings.
Sourcefn default_settings(&self) -> Option<Ref<Settings>>
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.