pub struct Funnel<C, T, F> { /* private fields */ }Expand description
A RefCollector that maps a mutable reference to an item
into another mutable reference.
This struct is created by RefCollector::funnel(). See its documentation for more.
Trait Implementations§
Source§impl<T, C, F> Collector for Funnel<C, T, F>
impl<T, C, F> Collector for Funnel<C, T, F>
Source§fn collect(&mut self, item: Self::Item) -> ControlFlow<()>
fn collect(&mut self, item: Self::Item) -> ControlFlow<()>
Collects an item and returns a
ControlFlow indicating whether
the collector has stopped accumulating right after this operation. Read moreSource§fn finish(self) -> Self::Output
fn finish(self) -> Self::Output
Consumes the collector and returns the accumulated result. Read more
Source§fn break_hint(&self) -> bool
fn break_hint(&self) -> bool
Returns a hint whether the collector has stopped accumulating. Read more
Source§fn collect_many(
&mut self,
items: impl IntoIterator<Item = Self::Item>,
) -> ControlFlow<()>where
Self: Sized,
fn collect_many(
&mut self,
items: impl IntoIterator<Item = Self::Item>,
) -> ControlFlow<()>where
Self: Sized,
Collects items from an iterator and returns a
ControlFlow indicating whether
the collector has stopped collecting right after this operation. Read moreSource§fn collect_then_finish(
self,
items: impl IntoIterator<Item = Self::Item>,
) -> Self::Outputwhere
Self: Sized,
fn collect_then_finish(
self,
items: impl IntoIterator<Item = Self::Item>,
) -> Self::Outputwhere
Self: Sized,
Collects items from an iterator, consumes the collector, and produces the accumulated result. Read more
Source§fn copying(self) -> Copying<Self>
fn copying(self) -> Copying<Self>
Creates a
RefCollector that copies every collected item. Read moreSource§fn map_ref<F, T>(self, f: F) -> MapRef<Self, T, F>
fn map_ref<F, T>(self, f: F) -> MapRef<Self, T, F>
Creates a
RefCollector that calls a closure on each item by mutable reference before collecting. Read moreSource§fn take_while<F>(self, pred: F) -> TakeWhile<Self, F>
fn take_while<F>(self, pred: F) -> TakeWhile<Self, F>
Source§fn chain<C>(self, other: C) -> Chain<Self, C::IntoCollector>
fn chain<C>(self, other: C) -> Chain<Self, C::IntoCollector>
Source§fn partition<C, F>(
self,
pred: F,
other_if_false: C,
) -> Partition<Self, C::IntoCollector, F>
fn partition<C, F>( self, pred: F, other_if_false: C, ) -> Partition<Self, C::IntoCollector, F>
Source§fn unzip<C>(self, other: C) -> Unzip<Self, C::IntoCollector>where
Self: Sized,
C: IntoCollector,
fn unzip<C>(self, other: C) -> Unzip<Self, C::IntoCollector>where
Self: Sized,
C: IntoCollector,
Source§fn unbatching<T, F>(self, f: F) -> Unbatching<Self, T, F>
fn unbatching<T, F>(self, f: F) -> Unbatching<Self, T, F>
Source§fn unbatching_ref<T, F>(self, f: F) -> UnbatchingRef<Self, T, F>
fn unbatching_ref<T, F>(self, f: F) -> UnbatchingRef<Self, T, F>
Creates a
RefCollector with a custom collection logic. Read moreSource§fn map_output<T, F>(self, f: F) -> MapOutput<Self, T, F>
fn map_output<T, F>(self, f: F) -> MapOutput<Self, T, F>
Source§fn nest<C>(self, inner: C) -> Nest<Self, C::IntoCollector>
fn nest<C>(self, inner: C) -> Nest<Self, C::IntoCollector>
Available on crate feature
unstable only.Source§fn nest_exact<C>(self, inner: C) -> NestExact<Self, C::IntoCollector>
fn nest_exact<C>(self, inner: C) -> NestExact<Self, C::IntoCollector>
Available on crate feature
unstable only.Source§impl<T, C, F> RefCollector for Funnel<C, T, F>
impl<T, C, F> RefCollector for Funnel<C, T, F>
Source§fn collect_ref(&mut self, item: &mut T) -> ControlFlow<()>
fn collect_ref(&mut self, item: &mut T) -> ControlFlow<()>
Collects an item and returns a
ControlFlow indicating whether
the collector has stopped accumulating right after this operation. Read moreSource§fn then<C>(self, other: C) -> Combine<Self, C::IntoCollector>
fn then<C>(self, other: C) -> Combine<Self, C::IntoCollector>
👎Deprecated since 0.3.0: Use
combine()Use
combine().Auto Trait Implementations§
impl<C, T, F> Freeze for Funnel<C, T, F>
impl<C, T, F> RefUnwindSafe for Funnel<C, T, F>where
C: RefUnwindSafe,
F: RefUnwindSafe,
impl<C, T, F> Send for Funnel<C, T, F>
impl<C, T, F> Sync for Funnel<C, T, F>
impl<C, T, F> Unpin for Funnel<C, T, F>
impl<C, T, F> UnwindSafe for Funnel<C, T, F>where
C: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CollectorByMut for Twhere
&'a mut T: for<'a> IntoCollector,
impl<T> CollectorByMut for Twhere
&'a mut T: for<'a> IntoCollector,
Source§type CollectorMut<'a> = <&'a mut T as IntoCollector>::IntoCollector
where
T: 'a
type CollectorMut<'a> = <&'a mut T as IntoCollector>::IntoCollector where T: 'a
Which collector being produced?
Source§fn collector_mut(&mut self) -> <T as CollectorByMut>::CollectorMut<'_>
fn collector_mut(&mut self) -> <T as CollectorByMut>::CollectorMut<'_>
Creates a
Collector from a mutable reference of a value.Source§impl<C> IntoCollector for Cwhere
C: Collector,
impl<C> IntoCollector for Cwhere
C: Collector,
Source§type IntoCollector = C
type IntoCollector = C
Which collector being produced?
Source§fn into_collector(self) -> <C as IntoCollector>::IntoCollector
fn into_collector(self) -> <C as IntoCollector>::IntoCollector
Creates a collector from a value.