Struct iterative_methods::Time [−][src]
pub struct Time<I, T> where
I: StreamingIterator<Item = T>,
T: Clone, { /* fields omitted */ }
Expand description
Adaptor that times every call to advance
on adaptee. Stores
start time and duration.
Trait Implementations
impl<I, T> StreamingIterator for Time<I, T> where
I: Sized + StreamingIterator<Item = T>,
T: Sized + Clone,
[src]
impl<I, T> StreamingIterator for Time<I, T> where
I: Sized + StreamingIterator<Item = T>,
T: Sized + Clone,
[src]type Item = TimedResult<T>
type Item = TimedResult<T>
The type of the elements being iterated over.
fn get(&self) -> Option<&Self::Item>
[src]
fn get(&self) -> Option<&Self::Item>
[src]Returns a reference to the current element of the iterator. Read more
fn next(&mut self) -> Option<&Self::Item>
[src]
fn next(&mut self) -> Option<&Self::Item>
[src]Advances the iterator and returns the next value. Read more
fn size_hint(&self) -> (usize, Option<usize>)
[src]
fn size_hint(&self) -> (usize, Option<usize>)
[src]Returns the bounds on the remaining length of the iterator.
fn all<F>(&mut self, f: F) -> bool where
F: FnMut(&Self::Item) -> bool,
[src]
fn all<F>(&mut self, f: F) -> bool where
F: FnMut(&Self::Item) -> bool,
[src]Determines if all elements of the iterator satisfy a predicate.
fn any<F>(&mut self, f: F) -> bool where
F: FnMut(&Self::Item) -> bool,
[src]
fn any<F>(&mut self, f: F) -> bool where
F: FnMut(&Self::Item) -> bool,
[src]Determines if any elements of the iterator satisfy a predicate.
fn chain<I>(self, other: I) -> Chain<Self, I> where
I: StreamingIterator<Item = Self::Item>,
[src]
fn chain<I>(self, other: I) -> Chain<Self, I> where
I: StreamingIterator<Item = Self::Item>,
[src]Consumes two iterators and returns a new iterator that iterates over both in sequence.
fn cloned(self) -> Cloned<Self> where
Self::Item: Clone,
[src]
fn cloned(self) -> Cloned<Self> where
Self::Item: Clone,
[src]Produces a normal, non-streaming, iterator by cloning the elements of this iterator.
fn count(self) -> usize
[src]
fn count(self) -> usize
[src]Consumes the iterator, counting the number of remaining elements and returning it.
fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]
fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]Creates an iterator which uses a closure to determine if an element should be yielded.
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, B, F> where
F: FnMut(&Self::Item) -> Option<B>,
[src]
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, B, F> where
F: FnMut(&Self::Item) -> Option<B>,
[src]Creates an iterator which both filters and maps by applying a closure to elements.
fn flat_map<J, F>(self, f: F) -> FlatMap<Self, J, F> where
F: FnMut(&Self::Item) -> J,
J: StreamingIterator,
[src]
fn flat_map<J, F>(self, f: F) -> FlatMap<Self, J, F> where
F: FnMut(&Self::Item) -> J,
J: StreamingIterator,
[src]Creates an iterator which flattens iterators obtained by applying a closure to elements. Note that the returned iterators must be streaming iterators. Read more
fn filter_map_deref<B, F>(self, f: F) -> FilterMapDeref<Self, F> where
F: FnMut(&Self::Item) -> Option<B>,
[src]
fn filter_map_deref<B, F>(self, f: F) -> FilterMapDeref<Self, F> where
F: FnMut(&Self::Item) -> Option<B>,
[src]Creates a regular, non-streaming iterator which both filters and maps by applying a closure to elements.
fn find<F>(&mut self, f: F) -> Option<&Self::Item> where
F: FnMut(&Self::Item) -> bool,
[src]
fn find<F>(&mut self, f: F) -> Option<&Self::Item> where
F: FnMut(&Self::Item) -> bool,
[src]Returns the first element of the iterator that satisfies the predicate.
fn fuse(self) -> Fuse<Self>
[src]
fn fuse(self) -> Fuse<Self>
[src]Creates an iterator which is “well behaved” at the beginning and end of iteration. Read more
fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item),
[src]
fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item),
[src]Call a closure on each element, passing the element on.
The closure is called upon calls to advance
or advance_back
, and exactly once per element
regardless of how many times (if any) get
is called. Read more
fn map<B, F>(self, f: F) -> Map<Self, B, F> where
F: FnMut(&Self::Item) -> B,
[src]
fn map<B, F>(self, f: F) -> Map<Self, B, F> where
F: FnMut(&Self::Item) -> B,
[src]Creates an iterator which transforms elements of this iterator by passing them to a closure.
fn map_deref<B, F>(self, f: F) -> MapDeref<Self, F> where
F: FnMut(&Self::Item) -> B,
[src]
fn map_deref<B, F>(self, f: F) -> MapDeref<Self, F> where
F: FnMut(&Self::Item) -> B,
[src]Creates a regular, non-streaming iterator which transforms elements of this iterator by passing them to a closure.
fn map_ref<B, F>(self, f: F) -> MapRef<Self, F> where
F: Fn(&Self::Item) -> &B,
B: ?Sized,
[src]
fn map_ref<B, F>(self, f: F) -> MapRef<Self, F> where
F: Fn(&Self::Item) -> &B,
B: ?Sized,
[src]Creates an iterator which transforms elements of this iterator by passing them to a closure. Read more
fn nth(&mut self, n: usize) -> Option<&Self::Item>
[src]
fn nth(&mut self, n: usize) -> Option<&Self::Item>
[src]Consumes the first n
elements of the iterator, returning the next one.
fn position<F>(&mut self, f: F) -> Option<usize> where
F: FnMut(&Self::Item) -> bool,
[src]
fn position<F>(&mut self, f: F) -> Option<usize> where
F: FnMut(&Self::Item) -> bool,
[src]Returns the index of the first element of the iterator matching a predicate.
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]
fn skip_while<F>(self, f: F) -> SkipWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]Creates an iterator that skips initial elements matching a predicate.
fn take(self, n: usize) -> Take<Self>
[src]
fn take(self, n: usize) -> Take<Self>
[src]Creates an iterator which only returns the first n
elements.
fn take_while<F>(self, f: F) -> TakeWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]
fn take_while<F>(self, f: F) -> TakeWhile<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]Creates an iterator which only returns initial elements matching a predicate.
fn rev(self) -> Rev<Self> where
Self: DoubleEndedStreamingIterator,
[src]
fn rev(self) -> Rev<Self> where
Self: DoubleEndedStreamingIterator,
[src]Creates an iterator which returns elemens in the opposite order.
Auto Trait Implementations
impl<I, T> RefUnwindSafe for Time<I, T> where
I: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, T> Send for Time<I, T> where
I: Send,
T: Send,
I: Send,
T: Send,
impl<I, T> Sync for Time<I, T> where
I: Sync,
T: Sync,
I: Sync,
T: Sync,
impl<I, T> Unpin for Time<I, T> where
I: Unpin,
T: Unpin,
I: Unpin,
T: Unpin,
impl<I, T> UnwindSafe for Time<I, T> where
I: UnwindSafe,
T: UnwindSafe,
I: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,