[][src]Function rayon::iter::empty

pub fn empty<T: Send>() -> Empty<T>

Creates a parallel iterator that produces nothing.

This admits no parallelism on its own, but it could be used for code that deals with generic parallel iterators.

Examples

use rayon::prelude::*;
use rayon::iter::empty;

let pi = (0..1234).into_par_iter()
    .chain(empty())
    .chain(1234..10_000);

assert_eq!(pi.count(), 10_000);