[−][src]Trait cron_clock::InputIter
abstracts common iteration operations on the input type
it needs a distinction between Item
and RawItem
because
&[T]
iterates on references
Associated Types
Loading content...Required methods
fn iter_indices(&self) -> Self::Iter
returns an iterator over the elements and their byte offsets
fn iter_elements(&self) -> Self::IterElem
returns an iterator over the elements
fn position<P>(&self, predicate: P) -> Option<usize> where
P: Fn(Self::RawItem) -> bool,
P: Fn(Self::RawItem) -> bool,
finds the byte position of the element
fn slice_index(&self, count: usize) -> Option<usize>
get the byte offset from the element's position in the stream
Implementations on Foreign Types
impl<'a> InputIter for &'a [u8]
[src]
type Item = u8
type RawItem = u8
type Iter = Enumerate<<&'a [u8] as InputIter>::IterElem>
type IterElem = Map<Iter<'a, <&'a [u8] as InputIter>::Item>, fn(&u8) -> u8>
fn iter_indices(&self) -> <&'a [u8] as InputIter>::Iter
[src]
fn iter_elements(&self) -> <&'a [u8] as InputIter>::IterElem
[src]
fn position<P>(&self, predicate: P) -> Option<usize> where
P: Fn(<&'a [u8] as InputIter>::Item) -> bool,
[src]
P: Fn(<&'a [u8] as InputIter>::Item) -> bool,
fn slice_index(&self, count: usize) -> Option<usize>
[src]
impl<'a> InputIter for &'a str
[src]
type Item = char
type RawItem = char
type Iter = CharIndices<'a>
type IterElem = Chars<'a>
fn iter_indices(&self) -> <&'a str as InputIter>::Iter
[src]
fn iter_elements(&self) -> <&'a str as InputIter>::IterElem
[src]
fn position<P>(&self, predicate: P) -> Option<usize> where
P: Fn(<&'a str as InputIter>::RawItem) -> bool,
[src]
P: Fn(<&'a str as InputIter>::RawItem) -> bool,
fn slice_index(&self, count: usize) -> Option<usize>
[src]
Implementors
impl<'a> InputIter for CompleteByteSlice<'a>
[src]
type Item = u8
type RawItem = u8
type Iter = Enumerate<<CompleteByteSlice<'a> as InputIter>::IterElem>
type IterElem = Map<Iter<'a, <CompleteByteSlice<'a> as InputIter>::Item>, fn(&u8) -> u8>
fn iter_indices(&self) -> <CompleteByteSlice<'a> as InputIter>::Iter
[src]
fn iter_elements(&self) -> <CompleteByteSlice<'a> as InputIter>::IterElem
[src]
fn position<P>(&self, predicate: P) -> Option<usize> where
P: Fn(<CompleteByteSlice<'a> as InputIter>::RawItem) -> bool,
[src]
P: Fn(<CompleteByteSlice<'a> as InputIter>::RawItem) -> bool,
fn slice_index(&self, count: usize) -> Option<usize>
[src]
impl<'a> InputIter for CompleteStr<'a>
[src]
type Item = char
type RawItem = char
type Iter = CharIndices<'a>
type IterElem = Chars<'a>
fn iter_indices(&self) -> <CompleteStr<'a> as InputIter>::Iter
[src]
fn iter_elements(&self) -> <CompleteStr<'a> as InputIter>::IterElem
[src]
fn position<P>(&self, predicate: P) -> Option<usize> where
P: Fn(<CompleteStr<'a> as InputIter>::RawItem) -> bool,
[src]
P: Fn(<CompleteStr<'a> as InputIter>::RawItem) -> bool,
fn slice_index(&self, count: usize) -> Option<usize>
[src]
impl<T> InputIter for Input<T> where
T: InputIter,
[src]
T: InputIter,
type Item = <T as InputIter>::Item
type RawItem = <T as InputIter>::RawItem
type Iter = <T as InputIter>::Iter
type IterElem = <T as InputIter>::IterElem
fn iter_indices(&self) -> <Input<T> as InputIter>::Iter
[src]
fn iter_elements(&self) -> <Input<T> as InputIter>::IterElem
[src]
fn position<P>(&self, predicate: P) -> Option<usize> where
P: Fn(<Input<T> as InputIter>::RawItem) -> bool,
[src]
P: Fn(<Input<T> as InputIter>::RawItem) -> bool,