use crate::error::MecoError;
use crate::word::nature::Nature;
use crate::word::shape_word::ShapeWord;
pub(crate) trait LetterTranslateRuleFrom: Sync {
fn get_mapper_code(
&self,
pre: &[char],
suf: &[char],
key: &str,
nature: Nature,
) -> Option<&'static str>;
fn contains(&self, key: &str) -> bool;
fn get_code_nature(&self, c: char) -> Nature;
fn is_translate_code_point(&self, c: char) -> bool;
fn is_word_code_point(&self, c: char) -> bool;
}
pub(crate) trait LetterTranslateRuleTo: Sync {
fn get_mapper_code(&self, builder: &mut String, word: &ShapeWord) -> Result<(), MecoError>;
fn contains(&self, key: &str) -> bool;
fn is_translate_code_point(&self, c: char) -> bool;
}