pub trait LazyMatcher<I: HaystackItem>: Matcher<I> {
type LazyAllMatches<'a, H: HaystackOf<'a, I>>: Iterator<Item = usize>;
type LazyAllCaptures<'a, H: HaystackOf<'a, I>>: Iterator<Item = (usize, IndexedCaptures)>;
// Required methods
fn lazy_matches<'a, H: HaystackOf<'a, I>>(hay: &mut H) -> bool;
fn lazy_all_matches<'a, H: HaystackOf<'a, I>>(
hay: &mut H,
) -> Self::LazyAllMatches<'a, H>;
fn lazy_captures<'a, H: HaystackOf<'a, I>>(
hay: &mut H,
caps: &mut IndexedCaptures,
) -> bool;
fn lazy_all_captures<'a, H: HaystackOf<'a, I>>(
hay: &mut H,
caps: &mut IndexedCaptures,
) -> Self::LazyAllCaptures<'a, H>;
}Required Associated Types§
type LazyAllMatches<'a, H: HaystackOf<'a, I>>: Iterator<Item = usize>
type LazyAllCaptures<'a, H: HaystackOf<'a, I>>: Iterator<Item = (usize, IndexedCaptures)>
Required Methods§
Sourcefn lazy_matches<'a, H: HaystackOf<'a, I>>(hay: &mut H) -> bool
fn lazy_matches<'a, H: HaystackOf<'a, I>>(hay: &mut H) -> bool
Functions exactly the same as Matcher::matches, except that the haystack’s index is left
at the first location where the match is considered successful.
Sourcefn lazy_all_matches<'a, H: HaystackOf<'a, I>>(
hay: &mut H,
) -> Self::LazyAllMatches<'a, H>
fn lazy_all_matches<'a, H: HaystackOf<'a, I>>( hay: &mut H, ) -> Self::LazyAllMatches<'a, H>
Functions exactly the same as Matcher::all_matches, except that the indices are produced
in the opposite order. The first value returned by the iterator is the one first encountered
in the haystack, not the one that produces the longest match.
Sourcefn lazy_captures<'a, H: HaystackOf<'a, I>>(
hay: &mut H,
caps: &mut IndexedCaptures,
) -> bool
fn lazy_captures<'a, H: HaystackOf<'a, I>>( hay: &mut H, caps: &mut IndexedCaptures, ) -> bool
Functions exactly the same as Matcher::captures, except that the haystack’s index and
captures represent the first location where the match is considered successful.
Sourcefn lazy_all_captures<'a, H: HaystackOf<'a, I>>(
hay: &mut H,
caps: &mut IndexedCaptures,
) -> Self::LazyAllCaptures<'a, H>
fn lazy_all_captures<'a, H: HaystackOf<'a, I>>( hay: &mut H, caps: &mut IndexedCaptures, ) -> Self::LazyAllCaptures<'a, H>
Functions exactly the same as Matcher::all_captures, except that the indices and
captures are produced in the opposite order. The first value returned by the iterator is the
one first encountered in the haystack, not the one that produces the longest match.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.