Skip to main content

Module sink_blocker

Module sink_blocker 

Source
Expand description

Implement SinkBlocker, a wrapper type to allow policy-based blocking of a futures::Sink.

Re-exportsยง

pub(crate) use boolean_policy::BooleanPolicy; ๐Ÿ”’
pub(crate) use counting_policy::CountingPolicy; ๐Ÿ”’
use std::pin::Pin; ๐Ÿ”’
use std::task::Context; ๐Ÿ”’
use std::task::Poll; ๐Ÿ”’
use std::task::Waker; ๐Ÿ”’
use futures::Sink; ๐Ÿ”’
use pin_project::pin_project; ๐Ÿ”’
use tor_error::Bug; ๐Ÿ”’

Modulesยง

boolean_policy ๐Ÿ”’
Implement a sink-blocking policy based on a simple blocked/unblocked status.
counting_policy ๐Ÿ”’
Implement a sink-blocking policy that allows a limited number of items to be sent.

Structsยง

SinkBlocker ๐Ÿ”’
A wrapper for a futures::Sink that allows its blocking status to be turned on and off according to a policy.

Traitsยง

Policy ๐Ÿ”’
A policy that describes whether cells can be sent on a SinkBlocker.