pub struct StopMatcher { /* private fields */ }Expand description
A stop-sequence matcher fed text incrementally.
Implementations§
Source§impl StopMatcher
impl StopMatcher
Sourcepub fn new(stops: Vec<String>) -> Self
pub fn new(stops: Vec<String>) -> Self
Create a matcher for the given stop sequences. Empty strings are ignored.
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
Whether a stop sequence has been reached.
Trait Implementations§
Source§impl Clone for StopMatcher
impl Clone for StopMatcher
Source§fn clone(&self) -> StopMatcher
fn clone(&self) -> StopMatcher
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StopMatcher
impl RefUnwindSafe for StopMatcher
impl Send for StopMatcher
impl Sync for StopMatcher
impl Unpin for StopMatcher
impl UnsafeUnpin for StopMatcher
impl UnwindSafe for StopMatcher
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