pub struct TokioRustlsRuntime { /* private fields */ }
Available on (crate features native-tls or rustls) and crate feature tokio and crate feature rustls only.
Expand description

A Runtime built around a Handle to a tokio runtime, and rustls.

Implementations§

Create a new TokioRustlsRuntime.

The return value will own the underlying Tokio runtime object, which will be dropped when the last copy of this handle is freed.

If you want to use a currently running runtime instead, call TokioRustlsRuntime::current().

Return a TokioRustlsRuntime wrapping the currently running Tokio runtime.

Usage note

We should never call this from inside other Arti crates, or from library crates that want to support multiple runtimes! This function is for Arti users who want to wrap some existing Tokio runtime as a Runtime. It is not for library crates that want to work with multiple runtimes.

Once you have a runtime returned by this function, you should just create more handles to it via Clone.

Trait Implementations§

Run future until it is ready, and return its output.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
A future returned by SleepProvider::sleep()
Return a future that will be ready after duration has elapsed. Read more
Return the SleepProvider’s view of the current instant. Read more
Return the SleepProvider’s view of the current wall-clock time. Read more
Signify that a test running under mock time shouldn’t advance time yet, with a given unique reason string. This is useful for making sure (mock) time doesn’t advance while things that might require some (real-world) time to complete do so, such as spawning a task on another thread. Read more
Signify that the reason to withhold time advancing provided in a call to block_advance no longer exists, and it’s fine to move time forward if nothing else is blocking advances. Read more
Allow a test running under mock time to advance time by the provided duration, even if the above block_advance API has been used. Read more
Spawns a future that will be run to completion. Read more
Determines whether the executor is able to spawn new tasks. Read more
The type for the TCP connections returned by Self::connect().
The type for the TCP listeners returned by Self::listen().
Launch a TCP connection to a given socket address. Read more
Open a TCP listener on a given socket address.
The Connector object that this provider can return.
The type of the stream returned by that connector.
Return a TLS connector for use with this runtime.
The type of Udp Socket returned by Self::bind()
Bind a local port to send and receive packets from

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Available on crate feature alloc only.
Spawns a task that polls the given future with output () to completion. Read more
Available on crate features channel and std only.
Spawns a task that polls the given future to completion and returns a future that resolves to the spawned future’s output. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.