Skip to main content

Module traits

Module traits 

Source
Expand description

Declarations for traits that we need our runtimes to implement.

Re-exportsยง

use async_trait::async_trait; ๐Ÿ”’
use asynchronous_codec::Framed; ๐Ÿ”’
use futures::future::FutureExt; ๐Ÿ”’
use futures::future::RemoteHandle; ๐Ÿ”’
use futures::stream; ๐Ÿ”’
use futures::task::Spawn; ๐Ÿ”’
use futures::task::SpawnError; ๐Ÿ”’
use futures::AsyncRead; ๐Ÿ”’
use futures::AsyncWrite; ๐Ÿ”’
use futures::Future; ๐Ÿ”’
use std::any::Any; ๐Ÿ”’
use std::borrow::Cow; ๐Ÿ”’
use std::fmt::Debug; ๐Ÿ”’
use std::fmt::Debug; ๐Ÿ”’
use std::io; ๐Ÿ”’
use std::io::Result as IoResult; ๐Ÿ”’
use std::net; ๐Ÿ”’
use tor_general_addr::unix; ๐Ÿ”’
use web_time_compat::Duration; ๐Ÿ”’
use web_time_compat::Instant; ๐Ÿ”’
use web_time_compat::InstantExt; ๐Ÿ”’
use web_time_compat::SystemTime; ๐Ÿ”’
use web_time_compat::SystemTimeExt; ๐Ÿ”’
use tor_cert_x509::TlsKeyAndCert; ๐Ÿ”’
use crate::network::TcpListenOptions; ๐Ÿ”’
use crate::network::UnixListenOptions; ๐Ÿ”’

Structsยง

NoOpStreamOpsHandle
A StreamOps handle that always returns an error.
TlsAcceptorSettings
Settings used for constructing a TlsAcceptor.
TlsServerUnsupported
An error returned by TlsProvider::tls_acceptor when the TlsProvider does not have TLS server support.
UnsupportedStreamOp
Error: Tried to perform a StreamOps operation on an unsupported stream type or on an unsupported platform.

Traitsยง

Blocking
Support for interacting with blocking (non-async) code
CertifiedConn
An object with a peer certificate: typically a TLS connection.
CoarseTimeProvider
A provider of reduced-precision timestamps
JoinSet
Trait representing a collection of tasks spawned on a Runtime.
JoinSetProvider
Trait for a runtime that can create JoinSets.
NetStreamListener
Trait for a local socket that accepts incoming streams.
NetStreamProvider
Trait for a runtime that can create and accept connections over network sockets.
Runtime
A runtime for use by Tor client library code.
SleepProvider
Trait for a runtime that can wait until a timer has expired.
SpawnExt
Extension trait for Spawn.
StreamOps
Additional operations that can be performed on connected stream sockets.
TlsConnector
An object that knows how to wrap a TCP connection (where the type of said TCP connection is S) with TLS.
TlsProvider
Trait for a runtime that knows how to create TLS connections over TCP streams of type S.
ToplevelBlockOn
Trait for a runtime that can be entered to block on a toplevel future.
ToplevelRuntime
A runtime that we can use to run Tor as a client.
UdpProvider
Trait for a runtime that can send and receive UDP datagrams.
UdpSocket
Trait for a locally bound Udp socket that can send and receive datagrams.