pub struct TextExpand { /* private fields */ }Implementations§
Source§impl TextExpand
impl TextExpand
Sourcepub fn with_language(language: Language) -> Self
pub fn with_language(language: Language) -> Self
Single-language mode (backward compatible). No detection overhead.
Sourcepub fn with_detector(
languages: &[Language],
default_language: Language,
detector: StreamingLanguageDetector,
) -> Self
pub fn with_detector( languages: &[Language], default_language: Language, detector: StreamingLanguageDetector, ) -> Self
Multi-language mode with a pre-built StreamingLanguageDetector.
Sourcepub fn new(tasks: Vec<Box<dyn ExpandTask>>) -> Self
pub fn new(tasks: Vec<Box<dyn ExpandTask>>) -> Self
Test/internal constructor: flat task list, no detection, English default.
pub fn push(&mut self, ch: char) -> Option<(ExpandUnit, Language)>
pub fn finish(&mut self) -> Option<(ExpandUnit, Language)>
Auto Trait Implementations§
impl Freeze for TextExpand
impl !RefUnwindSafe for TextExpand
impl Send for TextExpand
impl Sync for TextExpand
impl Unpin for TextExpand
impl UnsafeUnpin for TextExpand
impl !UnwindSafe for TextExpand
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more