[][src]Macro tokio_io::try_nb

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

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.