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::stream
other 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
String
s. - 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 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
KeySpecifier
s. - error 🔒
- Constructs an event at the error level.
- error_
report 🔒 - Log a report for
err
at levelERROR
- 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 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 beUnpin
and implementFusedFuture
. - trace 🔒
- Constructs an event at the trace level.
- warn 🔒
- Constructs an event at the warn level.
- warn_
report 🔒 - Log a report for
err
at 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)
- Client
Circ 🔒 - A circuit that we have constructed over the Tor network.
- Data
Stream 🔒 - An anonymized stream over the Tor network.
- Drop
Notify 🔒Watch Sender - Wrapper for
postage::watch::Sender
that sendsDropNotifyEof::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()
. - 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 [`HsBlindIdKeyKey’].
- 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 [`HsDescSigningKeyKey’].
- 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 [`HsIdKeyKey’].
- 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 [`HsIntroPtSessionIdKeyKey’].
- 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
Keystore
and any number of secondaryKeystore
s. - 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
Chan 🔒Target Builder - Builder for
OwnedChanTarget
. - Owned
Circ 🔒Target - 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
). - 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
- HsCirc
Kind 🔒 - The (onion-service-related) purpose for which a given circuit is going to be used.
- Keystore
Selector 🔒 - Specifies which keystores a
KeyMgr
operation should apply to. - Meta
Cell 🔒Disposition - 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.
- 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
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 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
Slug
s. - KeySpecifier
Component 🔒ViaDisplay From Str - Implement
KeySpecifierComponent
in terms ofDisplay
andFromStr
(helper trait) - NetDir
Provider 🔒 - An object that can provide [
NetDir
]s, as well as inform consumers when they might have changed. - Netdoc
Builder 🔒 - 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.
- Sleep
Provider 🔒 - 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 typeE
inResult<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
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. - _ 🔒
- Adapters specific to
Result
-returning streams - _ 🔒
- An
Iterator
blanket implementation that provides extra adaptors and methods. - _ 🔒
- Extensions to
Result<Void, E>
- _ 🔒
- 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 providemaybe_send
- _ 🔒
- Renaming of
Path::display
asdisplay_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.
- sensitive 🔒
- Wrap a value as
Sensitive
.
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§
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 🔒
- From 🔒
- What
#[derive(From)]
generates - Hash 🔒
- Derive macro generating an impl of the trait
Hash
. - Into 🔒
- What
#[derive(Into)]
generates - Serialize 🔒