Trait pattern_3::pattern::Pattern [−][src]
pub trait Pattern<H: Haystack>: Sized where
H::Target: Hay, { type Searcher: Searcher<H::Target>; type Consumer: Consumer<H::Target>; fn into_searcher(self) -> Self::Searcher; fn into_consumer(self) -> Self::Consumer; }
A pattern.
Associated Types
type Searcher: Searcher<H::Target>
The searcher associated with this pattern.
type Consumer: Consumer<H::Target>
The checker associated with this pattern.
Required Methods
fn into_searcher(self) -> Self::Searcher
Produces a searcher for this pattern.
fn into_consumer(self) -> Self::Consumer
Produces a checker for this pattern.
Implementations on Foreign Types
impl<'p, 'h, T> Pattern<&'h [T]> for &'p [T] where
T: PartialEq + 'p,
[src]
impl<'p, 'h, T> Pattern<&'h [T]> for &'p [T] where
T: PartialEq + 'p,
type Searcher = SliceSearcher<'p, T>
type Consumer = SliceChecker<'p, T>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'p, 'h, T> Pattern<&'h mut [T]> for &'p [T] where
T: PartialEq + 'p,
[src]
impl<'p, 'h, T> Pattern<&'h mut [T]> for &'p [T] where
T: PartialEq + 'p,
type Searcher = SliceSearcher<'p, T>
type Consumer = SliceChecker<'p, T>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'p, T> Pattern<Vec<T>> for &'p [T] where
T: PartialEq + 'p,
[src]
impl<'p, T> Pattern<Vec<T>> for &'p [T] where
T: PartialEq + 'p,
type Searcher = SliceSearcher<'p, T>
type Consumer = SliceChecker<'p, T>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h> Pattern<&'h str> for char
[src]
impl<'h> Pattern<&'h str> for char
type Searcher = CharSearcher
type Consumer = CharChecker
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h> Pattern<&'h mut str> for char
[src]
impl<'h> Pattern<&'h mut str> for char
type Searcher = CharSearcher
type Consumer = CharChecker
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h, 'p> Pattern<&'h str> for &'p [char]
[src]
impl<'h, 'p> Pattern<&'h str> for &'p [char]
type Searcher = MultiCharSearcher<MultiCharEq<'p>>
type Consumer = MultiCharSearcher<MultiCharEq<'p>>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h, 'p> Pattern<&'h mut str> for &'p [char]
[src]
impl<'h, 'p> Pattern<&'h mut str> for &'p [char]
type Searcher = MultiCharSearcher<MultiCharEq<'p>>
type Consumer = MultiCharSearcher<MultiCharEq<'p>>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h, 'p> Pattern<&'h str> for &'p str
[src]
impl<'h, 'p> Pattern<&'h str> for &'p str
type Searcher = SliceSearcher<'p, u8>
type Consumer = SliceChecker<'p, u8>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h, 'p> Pattern<&'h str> for &'p String
[src]
impl<'h, 'p> Pattern<&'h str> for &'p String
type Searcher = SliceSearcher<'p, u8>
type Consumer = SliceChecker<'p, u8>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h, 'q, 'p> Pattern<&'h str> for &'q &'p str
[src]
impl<'h, 'q, 'p> Pattern<&'h str> for &'q &'p str
type Searcher = SliceSearcher<'p, u8>
type Consumer = SliceChecker<'p, u8>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h, 'p> Pattern<&'h mut str> for &'p str
[src]
impl<'h, 'p> Pattern<&'h mut str> for &'p str
type Searcher = SliceSearcher<'p, u8>
type Consumer = SliceChecker<'p, u8>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h, 'p> Pattern<&'h mut str> for &'p String
[src]
impl<'h, 'p> Pattern<&'h mut str> for &'p String
type Searcher = SliceSearcher<'p, u8>
type Consumer = SliceChecker<'p, u8>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h, 'q, 'p> Pattern<&'h mut str> for &'q &'p str
[src]
impl<'h, 'q, 'p> Pattern<&'h mut str> for &'q &'p str
type Searcher = SliceSearcher<'p, u8>
type Consumer = SliceChecker<'p, u8>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
impl<'h, 'p> Pattern<&'h Wtf8> for &'p str
[src]
impl<'h, 'p> Pattern<&'h Wtf8> for &'p str
type Searcher = SliceSearcher<'p, u8>
type Consumer = SliceChecker<'p, u8>
fn into_searcher(self) -> Self::Searcher
[src]
fn into_searcher(self) -> Self::Searcher
fn into_consumer(self) -> Self::Consumer
[src]
fn into_consumer(self) -> Self::Consumer
Implementors
impl<'h, T, F> Pattern<&'h [T]> for F where
F: FnMut(&T) -> bool, type Searcher = ElemSearcher<F>; type Consumer = ElemSearcher<F>;impl<'h, T, F> Pattern<&'h mut [T]> for F where
F: FnMut(&T) -> bool, type Searcher = ElemSearcher<F>; type Consumer = ElemSearcher<F>;impl<T, F> Pattern<Vec<T>> for F where
F: FnMut(&T) -> bool, type Searcher = ElemSearcher<F>; type Consumer = ElemSearcher<F>;impl<'h, F: FnMut(char) -> bool> Pattern<&'h str> for F type Searcher = MultiCharSearcher<F>; type Consumer = MultiCharSearcher<F>;
impl<'h, F: FnMut(char) -> bool> Pattern<&'h mut str> for F type Searcher = MultiCharSearcher<F>; type Consumer = MultiCharSearcher<F>;
impl<'h, 'p> Pattern<&'h Wtf8> for &'p Wtf8 type Searcher = Wtf8Searcher<'p>; type Consumer = Wtf8Checker<'p>;