pub struct Sink;Implementations§
Source§impl Sink
impl Sink
Sourcepub async fn fold<T, Acc, F>(source: Source<T>, init: Acc, f: F) -> Acc
pub async fn fold<T, Acc, F>(source: Source<T>, init: Acc, f: F) -> Acc
Drive the source and accumulate a single value.
Sourcepub async fn fold_async<T, Acc, F, Fut>(
source: Source<T>,
init: Acc,
f: F,
) -> Acc
pub async fn fold_async<T, Acc, F, Fut>( source: Source<T>, init: Acc, f: F, ) -> Acc
Async fold.
Sourcepub async fn collect<T>(source: Source<T>) -> Vec<T>where
T: Send + 'static,
pub async fn collect<T>(source: Source<T>) -> Vec<T>where
T: Send + 'static,
Collect into a Vec.
pub async fn first<T>(source: Source<T>) -> Option<T>where
T: Send + 'static,
pub async fn last<T>(source: Source<T>) -> Option<T>where
T: Send + 'static,
pub async fn sum<T>(source: Source<T>) -> T
pub async fn count<T>(source: Source<T>) -> u64where
T: Send + 'static,
pub async fn for_each<T, F>(source: Source<T>, f: F)
pub async fn for_each_async<T, F, Fut>( source: Source<T>, parallelism: usize, f: F, )
pub async fn ignore<T: Send + 'static>(source: Source<T>)
Sourcepub async fn to_sender<T>(source: Source<T>, tx: UnboundedSender<T>)where
T: Send + 'static,
pub async fn to_sender<T>(source: Source<T>, tx: UnboundedSender<T>)where
T: Send + 'static,
Send each element to an UnboundedSender.
(atomr equivalent uses an mpsc channel).
Auto Trait Implementations§
impl Freeze for Sink
impl RefUnwindSafe for Sink
impl Send for Sink
impl Sync for Sink
impl Unpin for Sink
impl UnsafeUnpin for Sink
impl UnwindSafe for Sink
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