Rust has many postfix combinators, for example the
.unwrap_or(x)
and .unwrap_or_else(|| x)
functions.
They are useful if you want to extract some value from
an optionally present value, or if not, provide an
alternative value. It's really nice and tidy to read:
This is the second article in a series of articles around Rusts new async/await
feature. The first article about interfaces can be found
here.
In this part of the series we want to a look at a mechanism which behaves very
different in Rust than in all other languages which feature async/await
support. This mechanism is Cancellation.