pub struct BatchTextProcessor { /* private fields */ }
Expand description
批量文本处理器
Implementations§
Source§impl BatchTextProcessor
impl BatchTextProcessor
Sourcepub fn process_batch(
&mut self,
doms: &[&RcDom],
) -> TranslationResult<Vec<Vec<OptimizedTextItem>>>
pub fn process_batch( &mut self, doms: &[&RcDom], ) -> TranslationResult<Vec<Vec<OptimizedTextItem>>>
批量处理多个DOM
Sourcepub fn release_items(&mut self, items: Vec<OptimizedTextItem>)
pub fn release_items(&mut self, items: Vec<OptimizedTextItem>)
释放对象回池中以供重用
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchTextProcessor
impl !RefUnwindSafe for BatchTextProcessor
impl !Send for BatchTextProcessor
impl !Sync for BatchTextProcessor
impl Unpin for BatchTextProcessor
impl !UnwindSafe for BatchTextProcessor
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