Skip to main content

Crate tor_async_utils

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ยง

counting_streams
A facility for an MPSC channel that counts the number of outstanding entries on the channel.
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