Module transformable_channels::mpsc [] [src]

Near drop-in replacement for std::sync::mpsc; A variant of std::sync::mpsc that supports map-style operations.

This crate is near a drop-in replacement for std::sync::mpsc. The only difference is that the type ExtSender<T>, which replaces Sender<T>, supports operations such as map, filter and filter_map -- see the documentation of TransformableSender for all details and examples.

The type Receiver<T> is reexported from std::sync::mpsc::Receiver.

Structs

FilterMappedSender

An ExtSender obtained from a call to method filter_map.

FilteredSender

An ExtSender obtained from a call to method filter.

MappedSender

An ExtSender obtained from a call to method map.

RawSender

An implementation of ExtSender directly on top of std::sync::mpsc::Sender and with the same performance.

Receiver

The receiving-half of Rust's channel type. This half can only be owned by one thread

TiedSender

An ExtSender obtained from a call to method tie.

Traits

ExtSender

The sending-half of this crate's asynchronous channel type. This half can only be owned by one thread, but all instances can be cloned to let copies be shared with other threads.

TransformableSender

Functions

channel

Creates a new asynchronous channel, returning the sender/receiver halves. All data sent on the sender will become available on the receiver, and no send will block the calling thread (this channel has an "infinite buffer").

Implementations