Module async_compatibility_layer::channel

source ·
Expand description

Abstraction over channels. This will expose the following types:

Which channel is selected depends on these feature flags:

Note that exactly 1 of these features must be enabled. If 0 or 2+ are selected, you’ll get compiler errors.

Some of these implementations may not exist under the crate selected, in those cases they will be shimmed to another channel. e.g. oneshot might be implemented as bounded(1).

Structs§

Enums§

Functions§

  • Create a bounded sender/receiver pair, limited to len messages at a time.
  • Create a single-use channel. Under water this might be implemented as a bounded(1), but more efficient implementations might exist.
  • Create an unbounded channel. This will dynamically allocate whenever the internal buffer is full and a new message is added.