pub struct Map<I, F> { /* private fields */ }
Expand description
Event iterator that maps the events with a closure
This struct
is created by the EventIterator::map()
method. See its
documentation for more.
Trait Implementations§
Source§impl<B, I, F> EventIterator for Map<I, F>
impl<B, I, F> EventIterator for Map<I, F>
Source§fn poll_next<'a>(
self: Pin<&'a Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Self::Event<'a>>>
fn poll_next<'a>( self: Pin<&'a Self>, cx: &mut Context<'_>, ) -> Poll<Option<Self::Event<'a>>>
Attempt to pull out the next event of this event iterator, registering
the current task for wakeup if the value is not yet available, and
returning
None
if the event iterator is exhausted. Read moreSource§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Return the bounds on the remaining length of the event iterator. Read more
Source§fn next<'a>(self: Pin<&'a Self>) -> Next<'a, Self> ⓘwhere
Self: Sized,
fn next<'a>(self: Pin<&'a Self>) -> Next<'a, Self> ⓘwhere
Self: Sized,
Create a future that resolves to the next event in the event iterator. Read more
Source§fn next_unpinned(&self) -> Next<'_, Self> ⓘ
fn next_unpinned(&self) -> Next<'_, Self> ⓘ
Create a future that resolves to the next event in the event iterator. Read more
Source§fn map<B, F>(self, f: F) -> Map<Self, F>
fn map<B, F>(self, f: F) -> Map<Self, F>
Take a closure and create an event iterator which calls that closure on
each event. Read more
Source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
Create an event iterator which uses a closure to determine if an event
should be yielded. Read more
Source§fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
Create an event iterator that both filters and maps. Read more
Source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Do something with each event of an event iterator, passing the value on. Read more
Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Create an event iterator which gives the current iteration count as well
as the next event. Read more
Source§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
Create an event iterator which ends after the first
Ready(None)
. Read moreSource§fn tear(self) -> Tear<Self>where
Self: Sized,
fn tear(self) -> Tear<Self>where
Self: Sized,
Create an event iterator which ends after the first
Ready(None)
. Read moreAuto Trait Implementations§
impl<I, F> !Freeze for Map<I, F>
impl<I, F> !RefUnwindSafe for Map<I, F>
impl<I, F> Send for Map<I, F>
impl<I, F> !Sync for Map<I, F>
impl<I, F> Unpin for Map<I, F>
impl<I, F> UnwindSafe for Map<I, F>where
I: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
Source§impl<'b, T> AsEventIterator<'b> for Twhere
T: EventIterator + Unpin + 'b,
impl<'b, T> AsEventIterator<'b> for Twhere
T: EventIterator + Unpin + 'b,
Source§type Event = <T as EventIterator>::Event<'b>
type Event = <T as EventIterator>::Event<'b>
The type of the events being iterated over
Source§fn as_event_iter(&'b self) -> AsEventIter<'b, <T as AsEventIterator<'b>>::Event>
fn as_event_iter(&'b self) -> AsEventIter<'b, <T as AsEventIterator<'b>>::Event>
Cast to an
AsEventIter
. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more