Macro w5500_hl::block

source ·
macro_rules! block {
    ($e:expr) => { ... };
}
Expand description

Turns a non-blocking W5500 expression $e into a blocking operation.

This is accomplished by continuously calling the expression $e until it no longer returns Error::WouldBlock.

Input

An expression $e that evaluates to Result<T, Error<E>>

Output

  • Ok(t) if $e evaluates to Ok(t)
  • Err(e) if $e evaluates to any error that is not Err(Error::WouldBlock)