use blanket::blanket;
use std::borrow::Cow;
use super::CanonicalWordId;
use super::FuzzyMatchResult;
use crate::DictWordMetadata;
pub static CURATED_DICT_STR: &str = include_str!("../../dictionary.dict");
pub static ANNOTATIONS_STR: &str = include_str!("../../annotations.json");
#[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_correct_capitalizations_of(
&self,
word: &[char],
) -> Box<dyn Iterator<Item = &[char]> + Send + '_>;
fn get_word_metadata(&self, word: &[char]) -> Option<Cow<'_, DictWordMetadata>>;
fn get_word_metadata_str(&self, word: &str) -> Option<Cow<'_, DictWordMetadata>>;
fn get_word_metadata_exact(&self, word: &[char]) -> Option<&DictWordMetadata>;
fn words_iter(&self) -> Box<dyn Iterator<Item = &'_ [char]> + Send + '_>;
fn word_count(&self) -> usize;
fn get_word_from_id(&self, id: &CanonicalWordId) -> 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]>>;
}