Struct asyncplify::ParallelEmpty [] [src]

#[must_use = "stream adaptors are lazy and do nothing unless consumed"]
pub struct ParallelEmpty;

A ParallelStream that do not emits any element.

Examples

use asyncplify::*;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;

let found = Arc::new(AtomicBool::new(false));

ParallelEmpty
    .inspect(|_| found.store(true, Ordering::Release))
    .subscribe();

assert!(!found.load(Ordering::Acquire), "found = {}", found.load(Ordering::Acquire));

Trait Implementations

impl ParallelStream for ParallelEmpty

type Item = ()

fn consume<C: ParallelConsumer<()>>(self, _: C)

fn filter<F>(self, predicate: F) -> ParallelFilter<Self, F> where Self: Sized, F: Send + Fn(&mut Self::Item) -> bool

fn inspect<F>(self, func: F) -> ParallelInspect<Self, F> where F: Send + Sync + Fn(&mut Self::Item), Self: Sized

fn max(self) -> ParallelMax<Self> where Self: Sized

fn max_by_key<F, K>(self, f: F) -> ParallelMaxByKey<Self, F> where Self: Sized, F: Send + Sync + Fn(&Self::Item) -> K, K: PartialOrd + Send

fn min_by_key<F, K>(self, f: F) -> ParallelMinByKey<Self, F> where Self: Sized, F: Send + Sync + Fn(&Self::Item) -> K, K: PartialOrd + Send

fn observe_on<SC>(self, scheduler: SC) -> ParallelObserveOn<Self, SC> where SC: ParallelScheduler, Self: Sized

fn subscribe(self) where Self: Sized

fn subscribe_action<F>(self, action: F) where Self: Sized, F: Fn(Self::Item) + Send + Sync

fn subscribe_func<F>(self, predicate: F) where Self: Sized, F: Send + Sync + Fn(Self::Item) -> bool