Settings
Help

Module internal_prelude

Module internal_prelude 

Source
Expand description

Imports used internally within this crate

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 (eg, publish) 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::client::stream other than the high-level DataStream.

ModulesΒ§

broadcast πŸ”’
Provides a lossless, MPMC channel. All receivers are guaranteed to recieve each message.
curve25519 πŸ”’
Re-exporting Curve25519 implementations.
ed25519 πŸ”’
Re-exporting Ed25519 implementations, and related utilities.
fmt πŸ”’
Utilities for formatting and printing Strings.
fs πŸ”’
Filesystem manipulation operations.
future πŸ”’
Asynchronous values.
io πŸ”’
Traits, helpers, and type definitions for core I/O functionality.
iter πŸ”’
Composable external iteration.
mpsc πŸ”’
A multi-producer, single-consumer queue for sending values across asynchronous tasks.
watch πŸ”’
A state distribution channel. The internal state can be borrowed or cloned, but receivers do not observe every value.

MacrosΒ§

bad_api_usage πŸ”’
Create a bad API usage error, including a message like format!, and capturing this call site
chain πŸ”’
Chain zero or more iterators together into one sequence.
debug πŸ”’
Constructs an event at the debug level.
debug_report πŸ”’
Log a report for err at level DEBUG (or higher if it is a bug).
define_asref_dyn_std_error πŸ”’
Defines AsRef<dyn StdError + 'static> for a type implementing StdError
define_derive_deftly πŸ”’
Define a reuseable template
derive_deftly_template_KeySpecifier πŸ”’
A helper for implementing KeySpecifiers.
error πŸ”’
Constructs an event at the error level.
error_report πŸ”’
Log a report for err at level ERROR
impl_debug_hex πŸ”’
Define Debug to print as hex
info πŸ”’
Constructs an event at the info level.
info_report πŸ”’
Log a report for err at level INFO (or higher if it is a bug).
internal πŸ”’
Create an internal error, including a message like format!, and capturing this call site
into_bad_api_usage πŸ”’
Helper for converting an error into an bad API usage error
into_internal πŸ”’
Helper for converting an error into an internal error
log_ratelim πŸ”’
Log a rate-limited failure message.
select_biased πŸ”’
Polls multiple futures and streams simultaneously, executing the branch for the future that finishes first. Unlike select!, if multiple futures are ready, one will be selected in order of declaration. Futures directly passed to select_biased! must be Unpin and implement FusedFuture.
trace πŸ”’
Constructs an event at the trace level.
warn πŸ”’
Constructs an event at the warn level.
warn_report πŸ”’
Log a report for err at level WARN

StructsΒ§

AesOpeKey πŸ”’
Key for a simple order-preserving encryption on the offset from the start of an SRV protocol run.
Arc πŸ”’
A thread-safe reference-counting pointer. β€˜Arc’ stands for β€˜Atomically Reference Counted’.
ArtiPathRange πŸ”’
A range specifying a substring of a KeyPath.
AssertUnwindSafe πŸ”’
A simple wrapper around a type to assert that it is unwind safe.
BinaryHeap πŸ”’
A priority queue implemented with a binary heap.
BufReader πŸ”’
The BufReader<R> struct adds buffering to any reader.
BufWriter πŸ”’
Wraps a writer and buffers its output.
Bug πŸ”’
Programming error (a bug)
DataStream πŸ”’
An anonymized stream over the Tor network.
DropNotifyWatchSender πŸ”’
Wrapper for postage::watch::Sender that sends DropNotifyEof::eof() when dropped
Duration πŸ”’
A Duration type to represent a span of time, typically used for system timeouts.
File πŸ”’
An object providing access to an open file on the filesystem.
HashMap πŸ”’
A hash map implemented with quadratic probing and SIMD lookup.
HashSet πŸ”’
A hash set implemented as a HashMap where the value is ().
HsBlindId πŸ”’
A blinded onion service identity, represented in a compact format. (KP_hs_blind_id)
HsBlindIdKey πŸ”’
The β€œblinded” identity of a v3 onion service. (KP_hs_blind_id)
HsBlindIdKeypair πŸ”’
The private counterpart of a HsBlindIdKey.
HsCircPool πŸ”’
An object to provide circuits for implementing onion services.
HsClientDescEncKey πŸ”’
Client service discovery key, used for onion descriptor decryption. (KP_hsc_desc_enc)
HsDescBuilder πŸ”’
Builder for HsDesc.
HsDescSigningKeypair πŸ”’
The private counterpart of a HsDescSigningKey.
HsDescUploadRequest πŸ”’
A request to upload a hidden service descriptor
HsDirParams πŸ”’
Parameters for generating and using an HsDir ring.
HsIdKey πŸ”’
The identity of a v3 onion service, expanded into a public key. (KP_hs_id)
HsIdKeypair πŸ”’
The private counterpart of a HsIdKey.
HsIntroPtSessionIdKey πŸ”’
A key used to identify and authenticate an onion service at a single introduction point. (KP_hs_ipt_sid)
HsIntroPtSessionIdKeypair πŸ”’
The private counterpart of a HsIntroPtSessionIdKey.
HsNickname πŸ”’
Nickname (local identifier) for a Tor hidden service
HsSvcNtorKeypair πŸ”’
A pair of a public and private components for a HsSvcNtorKey.
InstanceRawSubdir πŸ”’
Subdirectory within an instance’s state, for raw filesystem operations
Instant πŸ”’
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
KeyMgr πŸ”’
A key manager that acts as a frontend to a primary Keystore and any number of secondary Keystores.
LockFileGuard πŸ”’
A lock-file for which we hold the lock.
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.
OpenOptions πŸ”’
Options and flags which can be used to configure how a file is opened.
OsStr πŸ”’
Borrowed reference to an OS string (see OsString).
OwnedChanTargetBuilder πŸ”’
Builder for OwnedChanTarget.
OwnedCircTarget πŸ”’
OwnedCircTarget is a summary of a CircTarget that owns all its members.
Path πŸ”’
A slice of a path (akin to str).
PathBuf πŸ”’
An owned, mutable path (akin to String).
PhantomData πŸ”’
Zero-sized type used to mark things that β€œact like” they own a T.
Relay πŸ”’
A view of a relay on the Tor network, suitable for building circuits.
RelayIds πŸ”’
RelayIds is an owned copy of the set of known identities of a relay.
RequestFailedError πŸ”’
An error that has occurred after we have contacted a directory cache and made a circuit to it.
RetryDelay πŸ”’
An implementation for retrying a remote operation based on a decorrelated jitter schedule.
RetryError πŸ”’
An error type for use when we’re going to do something a few times, and they might all fail.
RevisionCounter πŸ”’
Counts which revision of an onion service descriptor is which, within a given time period.
Slug πŸ”’
An owned slug, checked for syntax
SpawnError πŸ”’
An error that occurred during spawning.
StateDirectory πŸ”’
The whole program’s state directory
SystemTime πŸ”’
A measurement of the system clock, useful for talking to external entities like the file system or other processes.
TimePeriod πŸ”’
A period of time, as used in the onion service system.
VecDeque πŸ”’
A double-ended queue implemented with a growable ring buffer.

EnumsΒ§

AnyRelayMsg πŸ”’
A single parsed relay message, sent or received along a circuit
ConfigBuildError πŸ”’
An error related to an option passed to Arti via a configuration builder.
Cow πŸ”’
A clone-on-write smart pointer.
DirClientError πŸ”’
An error originating from the tor-dirclient crate.
Either πŸ”’
Combines two different futures, streams, or sinks having the same associated types into a single type.
ErrorKind πŸ”’
Classification of an error arising from Arti’s Tor operations
KeystoreSelector πŸ”’
Specifies which keystores a KeyMgr operation should apply to.
MetaCellDisposition πŸ”’
A possible successful outcome of giving a message to a MsgHandler.
Ordering πŸ”’
An Ordering is the result of a comparison between two values.
Reconfigure πŸ”’
Rules for reconfiguring a running Arti instance.
ReconfigureError πŸ”’
An error caused when attempting to reconfigure an existing Arti client, or one of its modules.
SeekFrom πŸ”’
Enumeration of possible methods to seek within an I/O object.
Timeliness πŸ”’
How β€œtimely” must a network directory be?
Void πŸ”’
The empty type for cases which can’t occur.

TraitsΒ§

Any πŸ”’
A trait to emulate dynamic typing.
AsyncRead πŸ”’
Read bytes asynchronously.
AsyncWrite πŸ”’
Write bytes asynchronously.
CircTarget πŸ”’
Information about a Tor relay used to extend a circuit to it.
CryptoRng πŸ”’
A marker trait over RngCore for securely unpredictable RNGs
Debug πŸ”’
? formatting.
Deserialize πŸ”’
A data structure that can be deserialized from any data format supported by Serde.
Deserializer πŸ”’
A data format that can deserialize any data structure supported by Serde.
Display πŸ”’
Format trait for an empty format, {}.
FromStr πŸ”’
Parse a value from a string
Future πŸ”’
A future represents an asynchronous computation, commonly obtained by use of async.
HasKind πŸ”’
Errors that can be categorized as belonging to an ErrorKind
Hash πŸ”’
A hashable type.
KeySpecifier πŸ”’
The β€œspecifier” of a key, which identifies an instance of a key.
KeySpecifierComponent πŸ”’
A trait for serializing and deserializing specific types of Slugs.
KeySpecifierComponentViaDisplayFromStr πŸ”’
Implement KeySpecifierComponent in terms of Display and FromStr (helper trait)
NetDirProvider πŸ”’
An object that can provide NetDirs, as well as inform consumers when they might have changed.
NetdocBuilder πŸ”’
A trait for building and signing netdocs.
Read πŸ”’
The Read trait allows for reading bytes from a source.
Rng πŸ”’
User-level interface for RNGs
RngCore πŸ”’
Implementation-level interface for RNGs
Runtime πŸ”’
A runtime for use by Tor client library code.
Seek πŸ”’
The Seek trait provides a cursor which can be moved within a stream of bytes.
Serialize πŸ”’
A data structure that can be serialized into any data format supported by Serde.
Serializer πŸ”’
A data format that can serialize any data structure supported by Serde.
SleepProvider πŸ”’
Trait for a runtime that can wait until a timer has expired.
StdError πŸ”’
Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.
Stream πŸ”’
A stream of values produced asynchronously.
Write πŸ”’
A trait for objects which are byte-oriented sinks.
_ πŸ”’
Extension trait for Spawn.
_ πŸ”’
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.
_ πŸ”’
Adapters specific to Result-returning streams
_ πŸ”’
An Iterator blanket implementation that provides extra adaptors and methods.
_ πŸ”’
Extensions to Result<Void, E>
_ πŸ”’
A type that can be displayed in a redacted or un-redacted form, but which forces the caller to choose.
_ πŸ”’
A redactable object is one where we know a way to display part of it when we are running with safe logging enabled.
_ πŸ”’
Extension trait for some postage::watch::Sender to provide maybe_send
_ πŸ”’
Renaming of Path::display as display_lossy
_ πŸ”’
Extension trait to provide .gen_range_checked()
_ πŸ”’
Trait implemented by anything that can serve as a relay message.
_ πŸ”’
Extension trait providing .report() method on concrete errors
_ πŸ”’
A pattern specifying some or all of a kind of key
_ πŸ”’
An object containing information about a relay’s identity keys.
_ πŸ”’
Objects that co-own a lock on an instance
_ πŸ”’
An extension trait on SleepProvider for timeouts and clock delays.

FunctionsΒ§

chain πŸ”’
Takes two iterables and creates a new iterator over both in sequence.
create_desc_sign_key_cert πŸ”’
Create the descriptor signing key certificate.
max πŸ”’
Compares and returns the maximum of two values.
mpsc_channel_no_memquota πŸ”’
Precisely futures::channel::mpsc::channel
send_request πŸ”’
Fetch or upload a Tor directory object using the provided stream.

Type AliasesΒ§

BoxStream πŸ”’
An owned dynamically typed Stream for use in cases where you can’t statically type your result or need to add some indirection.

Attribute MacrosΒ§

async_trait πŸ”’

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 πŸ”’
Hash πŸ”’
Derive macro generating an impl of the trait Hash.
Into πŸ”’
What #[derive(Into)] generates
Serialize πŸ”’