Skip to main content

Module circ_sender

Module circ_sender 

Source
Expand description

Implements a sender and a Stream type for sending messages from a channel to a circuit, prioritizing the delivery of DESTROY messages.

CircuitRxSender and CircuitRxReceiver take any channel message, because the receiving end can be either a client or a relay circuit reactor. The reactor itself will convert into its restricted message set.

Re-exportsยง

use std::pin::Pin; ๐Ÿ”’
use std::task; ๐Ÿ”’
use std::task::Context; ๐Ÿ”’
use std::task::Poll; ๐Ÿ”’
use futures::FutureExt as _; ๐Ÿ”’
use futures::SinkExt as _; ๐Ÿ”’
use futures::Stream; ๐Ÿ”’
use futures::StreamExt as _; ๐Ÿ”’
use oneshot_fused_workaround as oneshot; ๐Ÿ”’
use tor_basic_utils::assert_val_impl_trait; ๐Ÿ”’
use tor_cell::chancell::msg::AnyChanMsg; ๐Ÿ”’
use tor_cell::chancell::msg::Destroy; ๐Ÿ”’
use tor_memquota::mq_queue; ๐Ÿ”’
use tor_memquota::mq_queue::ChannelSpec; ๐Ÿ”’
use tor_memquota::mq_queue::MpscSpec; ๐Ÿ”’

Structsยง

CircuitRxReceiver ๐Ÿ”’
The receiving end of the SPSC queue for inbound data on its way from channel to circuit
CircuitRxReceiverInner ๐Ÿ”’
The inner state of a CircuitRxReceiver.
CircuitRxSender ๐Ÿ”’
The sending end of the SPSC queue for inbound data on its way from channel to circuit
CircuitRxSenderInner ๐Ÿ”’
The inner state of a CircuitRxSender.

Enumsยง

SendError ๐Ÿ”’
Error returned when trying to write to a CircuitRxSender

Functionsยง

channel ๐Ÿ”’
Wrap the sender and receiver of an mq_queue channel into CircuitRxSender and CircuitRxReceiver.