pub struct CompoundRuntime<SpawnR, SleepR, TcpR, TlsR, UdpR> { /* private fields */ }
Expand description

A runtime made of several parts, each of which implements one trait-group.

The SpawnR component should implements [Spawn] and BlockOn; the SleepR component should implement SleepProvider; the TcpR component should implement TcpProvider; and the TlsR component should implement TlsProvider.

You can use this structure to create new runtimes in two ways: either by overriding a single part of an existing runtime, or by building an entirely new runtime from pieces.

Implementations

Construct a new CompoundRuntime from its components.

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
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.