Settings
Help

Module internal_prelude

Module internal_prelude 

Source
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 from tor_proto::stream other than the high-level DataStream.

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 err at level ERROR
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 level TRACE (or higher if it is a bug).

StructsΒ§

Arc πŸ”’
A thread-safe reference-counting pointer. β€˜Arc’ stands for β€˜Atomically Reference Counted’.
AssertUnwindSafe πŸ”’
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 SleepProvider and CoarseTimeProvider
HashSet πŸ”’
A hash set implemented as a HashMap where 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::SlotMap that can never give the same key for multiple objects.
SpawnError πŸ”’
An error that occurred during spawning.
StreamUnobtrusivePeeker πŸ”’
Wraps Stream and provides \[poll_]peek and unobtrusive_peek
Waker πŸ”’
A Waker is a handle for waking up a task by notifying its executor that it is ready to be run.
Weak πŸ”’
Weak is a version of Arc that holds a non-owning reference to the managed allocation.

EnumsΒ§

ConfigBuildError πŸ”’
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 Ordering is 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Β§

CoarseTimeProvider πŸ”’
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 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.
_ πŸ”’
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 πŸ”’