Crate atm_io_utils [] [src]

Utilities for working with std::io and tokio_io.

Macros

retry

Helper macro for working with io::Result in a context where ErrorKind::Interrupted means to retry an action. This macro corresponds to std::try, but it will reevaluate the expression until it does not evaluate to an Err of kind Interrupted.

retry_nb

This macro is to retry what tokio_io::try_nb is to std::try. It works like try_nb, but it will reevaluate the expression until it does not evaluate to an Err of kind Interrupted.

Structs

Duplex

Implements both (Async)Read and (Async)Write by delegating to an (Async)Read and an (Async)Write, taking ownership of both.

MockDuplex

A duplex which pulls all read data from a queue and puts all written data into a queue.