Crate tor_async_utils

Source
Expand description

§tor-async-utils

Utilities (low-level) for Tor

Miscellaneous futures-related utilities for tor-* and arti-*.

This crate lives near the bottom of the Tor crate stack.

If you find anything in this crate generally useful, it should probably move out into a crate of its own.

License: MIT OR Apache-2.0

Re-exports§

pub use oneshot_fused_workaround as oneshot;

Modules§

join_read_write 🔒
Join a readable and writeable into a single AsyncRead + AsyncWrite
peekable_stream
Provides utilities for peeking at items in [futures::Stream].
prepare_send 🔒
Extension trait for using [Sink] more safely.
sink_close_channel 🔒
SinkCloseChannel
sink_try_send 🔒
SinkTrySend
sinkext 🔒
Extension trait for Sink.
stream_peek
StreamUnobtrusivePeeker
watch 🔒
Extension trait for more efficient use of [postage::watch].

Structs§

DropNotifyWatchSender
Wrapper for postage::watch::Sender that sends DropNotifyEof::eof() when dropped
JoinReadWrite
Async readable/writeable that dispatches reads to R and writes to W
MpscOtherSinkTrySendError
[mpsc::Sender::try_send] returned an uncategorisable error
SinkPrepareSendFuture
Future for SinkPrepareExt::prepare_send_from
SinkSendable
A [Sink] which is ready to receive an item

Enums§

ErasedSinkTrySendError
Type-erased error for SinkTrySend::try_send

Traits§

DropNotifyEofSignallable
Values that can signal EOF
PostageWatchSenderExt
Extension trait for some postage::watch::Sender to provide maybe_send
SinkCloseChannel
A [Sink] with a close_channel method like [futures::channel::mpsc::Sender’s]
SinkExt
Extension trait for Sink
SinkPrepareExt
Extension trait for [Sink] to add a method for cancel-safe usage.
SinkTrySend
A [Sink] with a try_send method like [futures::channel::mpsc::Sender’s]
SinkTrySendError
Error from SinkTrySend::try_send

Functions§

mpsc_channel_no_memquota
Precisely [futures::channel::mpsc::channel]