tokio_io

Macro try_nb

Source
macro_rules! try_nb {
    ($e:expr) => { ... };
}
Expand description

A convenience macro for working with io::Result<T> from the Read and Write traits.

This macro takes io::Result<T> as input, and returns T as the output. If the input type is of the Err variant, then Poll::NotReady is returned if it indicates WouldBlock or otherwise Err is returned.