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::streamother than the high-levelDataStream.
ModulesΒ§
- fmt π
- Utilities for formatting and printing Strings.
- 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 errat 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 errat levelTRACE(or higher if it is a bug).
StructsΒ§
- Arc π
- A thread-safe reference-counting pointer. βArcβ stands for βAtomically Reference Countedβ.
- AssertUnwind πSafe 
- A simple wrapper around a type to assert that it is unwind safe.
- BinaryHeap π
- A priority queue implemented with a binary heap.
- Bug π
- Programming error (a bug)
- CoarseInstant π
- A monotonic timestamp with reduced precision, and, in the future, saturating arithmetic
- DynTimeProvider π
- Type-erased SleepProviderandCoarseTimeProvider
- HashSet π
- A hash set implemented as a HashMapwhere the value is().
- Mutex π
- A mutual exclusion primitive useful for protecting shared data
- MutexGuard π
- An RAII implementation of a βscoped lockβ of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
- PhantomData π
- Zero-sized type used to mark things that βact likeβ they own a T.
- Pin π
- A pointer which pins its pointee in place.
- PoisonError π
- 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::SlotMapthat can never give the same key for multiple objects.
- SpawnError π
- An error that occurred during spawning.
- StreamUnobtrusive πPeeker 
- Wraps Streamand provides\[poll_]peekandunobtrusive_peek
- Waker π
- A Wakeris a handle for waking up a task by notifying its executor that it is ready to be run.
- Weak π
- Weakis a version of- Arcthat holds a non-owning reference to the managed allocation.
EnumsΒ§
- ConfigBuild πError 
- An error related to an option passed to Arti via a configuration builder.
- ErrorKind π
- Classification of an error arising from Artiβs Tor operations
- ExplicitOrAuto π
- A serializable value, or auto.
- Ordering π
- An Orderingis the result of a comparison between two values.
- ReconfigureError π
- 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Β§
- CoarseTime π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].
- FusedStream π
- A stream which tracks whether or not the underlying stream should no longer be polled.
- Future π
- A future represents an asynchronous computation, commonly 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 Sinkis a value into which other values can be sent, asynchronously.
- Spawn π
- The Spawntrait allows for pushing futures onto an executor that will run them to completion.
- Stream π
- A stream of values produced asynchronously.
- _ π
- An extension trait for Futures that provides a variety of convenient adapters.
- _ π
- An extension trait for Sinks that provides a variety of convenient combinator functions.
- _ π
- An extension trait for Streams that provides a variety of convenient combinator functions.
- _ π
- Extension trait for Spawn.
- _ π
- 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
- 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)]
- DerefMut π
- What #[derive(DerefMut)]generates
- Deserialize π
- Educe π
- Error π
- Serialize π