Module util

Module util 

Source
Expand description

A collection of utilities to deal with IO, futures and runtimes

Structs§

DummyIO
A dummy struct implementing Async IO traits
DummyStream
A dummy struct implementing Stream
IOHandle
A synchronous IO handle
RuntimeParts
Wrapper around separate Executor and Reactor implementing RuntimeKit
SocketAddrs
Wrapper to impl AsyncToSocketAddrs from an IntoIterator<Item = SocketAddr>
SocketAddrsFromIpAddrs
Iterator for SocketAddr computed from IpAddr + port
SocketAddrsResolver
Wrapper to perform blocking name resolution on top of an async runtime
Task
A wrapper around implementation-specific tasks that implement the TaskImpl trait
UnitFuture
Wrap a Future to discard its output

Traits§

TaskImpl
A common interface to wait for a Task completion, let it run n the background or cancel it.

Functions§

block_on_tokio
Block on the given future in a tokio context, creating a new one if required
inside_tokio
Check whether we’re in a tokio context or not