pub struct TextFilter { /* private fields */ }
Expand description
文本过滤器
Implementations§
Source§impl TextFilter
impl TextFilter
Sourcepub fn new(config: &TranslationConfig) -> Self
pub fn new(config: &TranslationConfig) -> Self
创建新的文本过滤器
Sourcepub fn should_translate(&self, text: &str) -> bool
pub fn should_translate(&self, text: &str) -> bool
判断文本是否应该翻译
Sourcepub fn analyze_text(&self, text: &str) -> TextAnalysis
pub fn analyze_text(&self, text: &str) -> TextAnalysis
分析文本的可翻译性
Auto Trait Implementations§
impl Freeze for TextFilter
impl RefUnwindSafe for TextFilter
impl Send for TextFilter
impl Sync for TextFilter
impl Unpin for TextFilter
impl UnwindSafe for TextFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more