use blanket::blanket;
use std::borrow::Cow;
use super::FuzzyMatchResult;
use super::WordId;
use crate::DictWordMetadata;
#[blanket(derive(Arc, Ref))]
pub trait Dictionary: Send + Sync {
fn contains_word(&self, word: &[char]) -> bool;
fn contains_word_str(&self, word: &str) -> bool;
fn contains_exact_word(&self, word: &[char]) -> bool;
fn contains_exact_word_str(&self, word: &str) -> bool;
fn fuzzy_match(
&'_ self,
word: &[char],
max_distance: u8,
max_results: usize,
) -> Vec<FuzzyMatchResult<'_>>;
fn fuzzy_match_str(
&'_ self,
word: &str,
max_distance: u8,
max_results: usize,
) -> Vec<FuzzyMatchResult<'_>>;
fn get_correct_capitalization_of(&self, word: &[char]) -> Option<&'_ [char]>;
fn get_word_metadata(&self, word: &[char]) -> Option<Cow<'_, DictWordMetadata>>;
fn get_word_metadata_str(&self, word: &str) -> Option<Cow<'_, DictWordMetadata>>;
fn words_iter(&self) -> Box<dyn Iterator<Item = &'_ [char]> + Send + '_>;
fn word_count(&self) -> usize;
fn get_word_from_id(&self, id: &WordId) -> Option<&[char]>;
fn find_words_with_prefix(&self, prefix: &[char]) -> Vec<Cow<'_, [char]>>;
fn find_words_with_common_prefix(&self, word: &[char]) -> Vec<Cow<'_, [char]>>;
}