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 viause 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::client::streamother than the high-levelDataStream.
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
errat levelDEBUG(or higher if it is a bug). - define_
asref_ πdyn_ std_ error - Defines
AsRef<dyn StdError + 'static>for a type implementingStdError - 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
errat levelERROR - impl_
debug_ πhex - Define
Debugto print as hex - info π
- Constructs an event at the info level.
- info_
report π - Log a report for
errat levelINFO(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 toselect_biased!must beUnpinand implementFusedFuture. - trace π
- Constructs an event at the trace level.
- warn π
- Constructs an event at the warn level.
- warn_
report π - Log a report for
errat levelWARN
StructsΒ§
- AesOpe
Key π - 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β.
- Arti
Path πRange - A range specifying a substring of a
KeyPath. - 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.
- BufReader π
- The
BufReader<R>struct adds buffering to any reader. - BufWriter π
- Wraps a writer and buffers its output.
- Bug π
- Programming error (a bug)
- Data
Stream π - An anonymized stream over the Tor network.
- Drop
Notify πWatch Sender - Wrapper for
postage::watch::Senderthat sendsDropNotifyEof::eof()when dropped - Duration π
- A
Durationtype 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
HashMapwhere the value is(). - HsBlind
Id π - A blinded onion service identity, represented in a compact format. (
KP_hs_blind_id) - HsBlind
IdKey π - The βblindedβ identity of a v3 onion service. (
KP_hs_blind_id) - HsBlind
IdKeypair π - The private counterpart of a
HsBlindIdKey. - HsCirc
Pool π - An object to provide circuits for implementing onion services.
- HsClient
Desc πEncKey - Client service discovery key, used for onion descriptor
decryption. (
KP_hsc_desc_enc) - HsDesc
Builder π - Builder for
HsDesc. - HsDesc
Signing πKeypair - The private counterpart of a
HsDescSigningKey. - HsDesc
Upload πRequest - A request to upload a hidden service descriptor
- HsDir
Params π - Parameters for generating and using an HsDir ring.
- HsIdKey π
- The identity of a v3 onion service, expanded into a public key. (
KP_hs_id) - HsId
Keypair π - The private counterpart of a
HsIdKey. - HsIntro
PtSession πIdKey - A key used to identify and authenticate an onion service at a single
introduction point. (
KP_hs_ipt_sid) - HsIntro
PtSession πIdKeypair - The private counterpart of a
HsIntroPtSessionIdKey. - HsNickname π
- Nickname (local identifier) for a Tor hidden service
- HsSvc
Ntor πKeypair - A pair of a public and private components for a
HsSvcNtorKey. - Instance
RawSubdir π - 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
Keystoreand any number of secondaryKeystores. - Lock
File πGuard - A lock-file for which we hold the lock.
- 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.
- Open
Options π - Options and flags which can be used to configure how a file is opened.
- OsStr π
- Borrowed reference to an OS string (see
OsString). - Owned
Circ πTarget - OwnedCircTarget is a summary of a
CircTargetthat owns all its members. - Path π
- A slice of a path (akin to
str). - PathBuf π
- An owned, mutable path (akin to
String). - Phantom
Data π - 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.
- Relay
Ids π - RelayIds is an owned copy of the set of known identities of a relay.
- Request
Failed πError - An error that has occurred after we have contacted a directory cache and made a circuit to it.
- Retry
Delay π - An implementation for retrying a remote operation based on a decorrelated jitter schedule.
- Retry
Error π - An error type for use when weβre going to do something a few times, and they might all fail.
- Revision
Counter π - Counts which revision of an onion service descriptor is which, within a given time period.
- Slug π
- An owned slug, checked for syntax
- Spawn
Error π - An error that occurred during spawning.
- State
Directory π - The whole programβs state directory
- System
Time π - A measurement of the system clock, useful for talking to external entities like the file system or other processes.
- Time
Period π - A period of time, as used in the onion service system.
- VecDeque π
- A double-ended queue implemented with a growable ring buffer.
EnumsΒ§
- AnyRelay
Msg π - A single parsed relay message, sent or received along a circuit
- Config
Build πError - An error related to an option passed to Arti via a configuration builder.
- Cow π
- A clone-on-write smart pointer.
- DirClient
Error π - 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.
- Error
Kind π - Classification of an error arising from Artiβs Tor operations
- Keystore
Selector π - Specifies which keystores a
KeyMgroperation should apply to. - Meta
Cell πDisposition - A possible successful outcome of giving a message to a
MsgHandler. - Ordering π
- An
Orderingis the result of a comparison between two values. - Reconfigure π
- Rules for reconfiguring a running Arti instance.
- Reconfigure
Error π - An error caused when attempting to reconfigure an existing Arti client, or one of its modules.
- Seek
From π - 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.
- Async
Read π - Read bytes asynchronously.
- Async
Write π - Write bytes asynchronously.
- Circ
Target π - Information about a Tor relay used to extend a circuit to it.
- Crypto
Rng π - A marker trait over
RngCorefor 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.
- KeySpecifier
Component π - A trait for serializing and deserializing specific types of
Slugs. - KeySpecifier
Component πViaDisplay From Str - Implement
KeySpecifierComponentin terms ofDisplayandFromStr(helper trait) - NetDir
Provider π - An object that can provide
NetDirs, as well as inform consumers when they might have changed. - Netdoc
Builder π - Builders for network documents.
- Read π
- The
Readtrait 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
Seektrait 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.
- Sleep
Provider π - Trait for a runtime that can wait until a timer has expired.
- StdError π
Erroris a trait representing the basic expectations for error values, i.e., values of typeEinResult<T, E>.- Stream π
- A stream of values produced asynchronously.
- Write π
- A trait for objects which are byte-oriented sinks.
- _ π
- 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
Iteratorblanket implementation that provides extra adaptors and methods. - _ π
- Extension trait for
Spawn. - _ π
- 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
redactableobject 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::Senderto providemaybe_send - _ π
- Renaming of
Path::displayasdisplay_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
SleepProviderfor 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
Streamfor 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)] - Deref
Mut π - What
#[derive(DerefMut)]generates - Deserialize π
- Educe π
- Error π
- Hash π
- Derive macro generating an impl of the trait
Hash. - Into π
- What
#[derive(Into)]generates - Serialize π