Skip to main content

Module counting_streams

Module counting_streams 

Source
Expand description

A facility for an MPSC channel that counts the number of outstanding entries on the channel.

Re-exportsยง

use std::pin::Pin; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::sync::atomic::AtomicUsize; ๐Ÿ”’
use std::sync::atomic::Ordering; ๐Ÿ”’
use std::task::ready; ๐Ÿ”’
use std::task::Context; ๐Ÿ”’
use std::task::Poll; ๐Ÿ”’
use futures::Stream; ๐Ÿ”’
use futures::sink::Sink; ๐Ÿ”’
use futures::stream::FusedStream; ๐Ÿ”’
use pin_project::pin_project; ๐Ÿ”’

Structsยง

CountingSink
A wrapper around an arbitrary Sink, to count the items inserted.
CountingStream
A wrapper around an arbitrary Stream, to count the items inserted.

Functionsยง

channel
Wrap a Sink/Stream pair into a CountingSink and CountingStream pair.