Expand description
Internal prelude
This file contains most of the imports we wish to use, throughout this crate.
Every module does use crate::internal_prelude::*;
Exceptions:
-
Names that are private to a module and its submodules are imported to the sub-modules via
use super::*
. (Thus, the sub-module inherits the prelude from its parent.) -
Broad names from specific contexts, that are unsuitable for wide imports. For example, individual cell and message names from
tor-cell
, and the types fromtor_proto::stream
other than the high-levelDataStream
.
Modules§
- fmt 🔒
- Utilities for formatting and printing
String
s. - mem 🔒
- Basic functions for dealing with memory.
- mpsc 🔒
- A multi-producer, single-consumer queue for sending values across asynchronous tasks.
Macros§
- assert_
not_ 🔒impl_ any - Asserts that the type does not implement any of the given traits.
- chain 🔒
- Chain zero or more iterators together into one sequence.
- debug 🔒
- Constructs an event at the debug level.
- define_
derive_ 🔒deftly - Define a reuseable template
- derive_
deftly_ 🔒adhoc - Expand an ad-hoc template, on a data structure decorated
#[derive_deftly_adhoc]
- error 🔒
- Constructs an event at the error level.
- error_
report 🔒 - Log a report for
err
at levelERROR
- info 🔒
- Constructs an event at the info level.
- internal 🔒
- Create an internal error, including a message like
format!
, and capturing this call site - into_
internal 🔒 - Helper for converting an error into an internal error
- log_
ratelim 🔒 - Log a rate-limited failure message.
- paste 🔒
- trace_
report 🔒 - Log a report for
err
at levelTRACE
(or higher if it is a bug).
Structs§
- Arc 🔒
- A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
- Assert
Unwind 🔒Safe - A simple wrapper around a type to assert that it is unwind safe.
- Binary
Heap 🔒 - A priority queue implemented with a binary heap.
- Bug 🔒
- Programming error (a bug)
- Coarse
Instant 🔒 - A monotonic timestamp with reduced precision, and, in the future, saturating arithmetic
- DynTime
Provider 🔒 - Type-erased
SleepProvider
andCoarseTimeProvider
- HashSet 🔒
- A hash set implemented as a
HashMap
where the value is()
. - Mutex 🔒
- A mutual exclusion primitive useful for protecting shared data
- Mutex
Guard 🔒 - An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
- Phantom
Data 🔒 - Zero-sized type used to mark things that “act like” they own a
T
. - Pin 🔒
- A pointer which pins its pointee in place.
- Poison
Error 🔒 - A type of error which can be returned whenever a lock is acquired.
- Qty 🔒
- Quantity of memory used, measured in bytes.
- Reverse 🔒
- A helper struct for reverse ordering.
- SlotMap 🔒
- A variation of
slotmap::SlotMap
that can never give the same key for multiple objects. - Spawn
Error 🔒 - An error that occurred during spawning.
- Stream
Unobtrusive 🔒Peeker - Wraps
Stream
and provides\[poll_]peek
andunobtrusive_peek
- Weak 🔒
Weak
is a version ofArc
that holds a non-owning reference to the managed allocation.
Enums§
- Config
Build 🔒Error - An error related to an option passed to Arti via a configuration builder.
- Error
Kind 🔒 - Classification of an error arising from Arti’s Tor operations
- Ordering 🔒
- An
Ordering
is the result of a comparison between two values. - Reconfigure
Error 🔒 - An error caused when attempting to reconfigure an existing Arti client, or one of its modules.
- Void 🔒
- The empty type for cases which can’t occur.
Traits§
- Coarse
Time 🔒Provider - A provider of reduced-precision timestamps
- Debug 🔒
?
formatting.- Deserialize 🔒
- A data structure that can be deserialized from any data format supported by Serde.
- DynClone 🔒
- This trait is implemented by any type that implements [
std::clone::Clone
]. - Fused
Stream 🔒 - A stream which tracks whether or not the underlying stream should no longer be polled.
- Future 🔒
- A future represents an asynchronous computation obtained by use of
async
. - HasKind 🔒
- Errors that can be categorized as belonging to an
ErrorKind
- Serialize 🔒
- A data structure that can be serialized into any data format supported by Serde.
- Sink 🔒
- A
Sink
is a value into which other values can be sent, asynchronously. - Spawn 🔒
- The
Spawn
trait allows for pushing futures onto an executor that will run them to completion. - Stream 🔒
- A stream of values produced asynchronously.
- _ 🔒
- Extension trait for
Spawn
. - _ 🔒
- An extension trait for
Future
s that provides a variety of convenient adapters. - _ 🔒
- An extension trait for
Sink
s that provides a variety of convenient combinator functions. - _ 🔒
- An extension trait for
Stream
s that provides a variety of convenient combinator functions. - _ 🔒
- Extensions to
Result<T, Void>
Functions§
- catch_
unwind 🔒 - Invokes a closure, capturing the cause of an unwinding panic if one occurs.
- chain 🔒
- Takes two iterables and creates a new iterator over both in sequence.
- mpsc_
channel_ 🔒no_ memquota - Precisely
futures::channel::mpsc::channel
- noop_
waker_ 🔒ref - Get a static reference to a
Waker
which does nothing whenwake()
is called on it. - size_of 🔒
- Returns the size of a type in bytes.
Attribute Macros§
- pin_
project 🔒 - An attribute that creates projection types covering all the fields of struct or enum.
Derive Macros§
- Constructor 🔒
- What
#[derive(Constructor)]
generates - Debug 🔒
- Derive macro generating an impl of the trait
Debug
. - Deftly 🔒
- Perform ad-hoc templating driven by a data structure
- Deref 🔒
- Using
#[derive(Deref)]
- Deref
Mut 🔒 - What
#[derive(DerefMut)]
generates - Deserialize 🔒
- Educe 🔒
- Error 🔒
- Serialize 🔒