Trait collections::str::pattern::DoubleEndedSearcher [] [src]

pub trait DoubleEndedSearcher<'a>: ReverseSearcher<'a> { }
Unstable

: API not fully fleshed out and ready to be stabilized

A marker trait to express that a ReverseSearcher can be used for a DoubleEndedIterator implementation.

For this, the impl of Searcher`Searcherand` and ReverseSearcher need to follow these conditions:

Examples

char::Searcher is a DoubleEndedSearcher because searching for a char`char` only requires looking at one at a time, which behaves the same from both ends.

(&str)::Searcher is not a DoubleEndedSearcher because the pattern "aa"`"aa"in the haystack"aaa"matches as either"[aa]a"or` or "a[aa]"`"a[aa]"`, depending from which side it is searched.

Implementors