pub struct DynamicMatcher<'a> { /* private fields */ }Expand description
Matched regular expressions that are compiled at runtime.
Trait Implementations§
Source§impl<'a> Clone for DynamicMatcher<'a>
impl<'a> Clone for DynamicMatcher<'a>
Source§fn clone(&self) -> DynamicMatcher<'a>
fn clone(&self) -> DynamicMatcher<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> RegexMatcher<&'a str> for DynamicMatcher<'_>
impl<'a> RegexMatcher<&'a str> for DynamicMatcher<'_>
Source§fn step(&mut self, inp: &'a str)
fn step(&mut self, inp: &'a str)
Takes a transition in the state machine, accepting a single symbol. Read more
Source§fn is_accepting(&self) -> bool
fn is_accepting(&self) -> bool
Returns whether the current state would accept the regular expression.
Source§fn step_many(&mut self, inp: impl IntoIterator<Item = A>)
fn step_many(&mut self, inp: impl IntoIterator<Item = A>)
Steps once for each element in the iterator
Source§fn step_unless_empty(&mut self, inp: impl IntoIterator<Item = A>)
fn step_unless_empty(&mut self, inp: impl IntoIterator<Item = A>)
Steps once for each element in the iterator
Source§fn accepts(&self, iter: impl IntoIterator<Item = A>) -> bool
fn accepts(&self, iter: impl IntoIterator<Item = A>) -> bool
Returns true if the regular expression accepts the input iterator
Source§fn accepts_prefix(&self, iter: impl IntoIterator<Item = A>) -> bool
fn accepts_prefix(&self, iter: impl IntoIterator<Item = A>) -> bool
Returns true if the regular expression accepts a word of which the input iterator is a prefix
Source§impl RegexMatcher<char> for DynamicMatcher<'_>
impl RegexMatcher<char> for DynamicMatcher<'_>
Source§fn step(&mut self, inp: char)
fn step(&mut self, inp: char)
Takes a transition in the state machine, accepting a single symbol. Read more
Source§fn is_accepting(&self) -> bool
fn is_accepting(&self) -> bool
Returns whether the current state would accept the regular expression.
Source§fn step_many(&mut self, inp: impl IntoIterator<Item = A>)
fn step_many(&mut self, inp: impl IntoIterator<Item = A>)
Steps once for each element in the iterator
Source§fn step_unless_empty(&mut self, inp: impl IntoIterator<Item = A>)
fn step_unless_empty(&mut self, inp: impl IntoIterator<Item = A>)
Steps once for each element in the iterator
Source§fn accepts(&self, iter: impl IntoIterator<Item = A>) -> bool
fn accepts(&self, iter: impl IntoIterator<Item = A>) -> bool
Returns true if the regular expression accepts the input iterator
Source§fn accepts_prefix(&self, iter: impl IntoIterator<Item = A>) -> bool
fn accepts_prefix(&self, iter: impl IntoIterator<Item = A>) -> bool
Returns true if the regular expression accepts a word of which the input iterator is a prefix
Auto Trait Implementations§
impl<'a> Freeze for DynamicMatcher<'a>
impl<'a> RefUnwindSafe for DynamicMatcher<'a>
impl<'a> !Send for DynamicMatcher<'a>
impl<'a> !Sync for DynamicMatcher<'a>
impl<'a> Unpin for DynamicMatcher<'a>
impl<'a> UnwindSafe for DynamicMatcher<'a>
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