pub struct Matcher<'a, S = usize, A = DenseDFA<&'a [S], S>> where
S: StateID,
A: DFA<ID = S>, { /* private fields */ }
Expand description
A reference to a Pattern
that matches a single input.
Implementations
sourceimpl<'a, S, A> Matcher<'a, S, A> where
S: StateID,
A: DFA<ID = S>,
impl<'a, S, A> Matcher<'a, S, A> where
S: StateID,
A: DFA<ID = S>,
sourcepub fn is_matched(&self) -> bool
pub fn is_matched(&self) -> bool
Returns true
if this Matcher
has matched any input that has been
provided.
sourcepub fn matches(self, s: &impl AsRef<str>) -> bool
pub fn matches(self, s: &impl AsRef<str>) -> bool
Returns true
if this pattern matches the formatted output of the given
type implementing fmt::Debug
.
sourcepub fn debug_matches(self, d: &impl Debug) -> bool
pub fn debug_matches(self, d: &impl Debug) -> bool
Returns true
if this pattern matches the formatted output of the given
type implementing fmt::Debug
.
sourcepub fn display_matches(self, d: &impl Display) -> bool
pub fn display_matches(self, d: &impl Display) -> bool
Returns true
if this pattern matches the formatted output of the given
type implementing fmt::Display
.
Trait Implementations
sourceimpl<'a, S, A> Write for Matcher<'a, S, A> where
S: StateID,
A: DFA<ID = S>,
impl<'a, S, A> Write for Matcher<'a, S, A> where
S: StateID,
A: DFA<ID = S>,
sourceimpl<'a, S, A> Write for Matcher<'a, S, A> where
S: StateID,
A: DFA<ID = S>,
impl<'a, S, A> Write for Matcher<'a, S, A> where
S: StateID,
A: DFA<ID = S>,
sourcefn write(&mut self, bytes: &[u8]) -> Result<usize, Error>
fn write(&mut self, bytes: &[u8]) -> Result<usize, Error>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn flush(&mut self) -> Result<(), Error>
fn flush(&mut self) -> Result<(), Error>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
1.0.0 · sourcefn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
sourcefn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations
impl<'a, S, A> RefUnwindSafe for Matcher<'a, S, A> where
A: RefUnwindSafe,
S: RefUnwindSafe,
impl<'a, S, A> Send for Matcher<'a, S, A> where
A: Send,
S: Send,
impl<'a, S, A> Sync for Matcher<'a, S, A> where
A: Sync,
S: Sync,
impl<'a, S, A> Unpin for Matcher<'a, S, A> where
A: Unpin,
S: Unpin,
impl<'a, S, A> UnwindSafe for Matcher<'a, S, A> where
A: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more