Struct stream_cancel::Valve[][src]

pub struct Valve(_);

A Valve is associated with a Trigger, and can be used to wrap one or more asynchronous streams. All streams wrapped by a given Valve (or its clones) will be interrupted when [Trigger::close] is called on the valve's associated handle.

Methods

impl Valve
[src]

Make a new Valve and an associated Trigger.

Wrap the given stream with this Valve.

When [Trigger::close] is called on the handle associated with this valve, the given stream will immediately yield None.

Trait Implementations

impl Clone for Valve
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Valve
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Valve

impl Sync for Valve