Module prelude

Source
Expand description

Commonly needed reexports from futures and tokio-core.

Structs§

Core
An event loop.
TcpStream
An I/O object representing a TCP stream connected to a remote endpoint.

Traits§

Future
Trait for types which are a placeholder of a value that may become available at some later point in time.
IntoFuture
Class of types which can be converted into a future.
IoDeprecated
A trait for read/write I/O objects
Sink
A Sink is a value into which other values can be sent, asynchronously.
Stream
A stream of values, not all of which may have been produced yet.

Functions§

empty
Creates a future which never resolves, representing a computation that never finishes.
err
Creates a “leaf future” from an immediate value of a failed computation.
lazy
Creates a new future which will eventually be the same as the one created by the closure provided.
ok
Creates a “leaf future” from an immediate value of a finished and successful computation.
result
Creates a new “leaf future” which will resolve with the given result.