Using futures
A future
represents a value that will be available later, or an error, similar to the Result
type. A stream
represents multiple values (or errors) that will be available at different times in the future
, similar to an Iterator<Result<T>>
. This crate provides many combinators such as and_then()
, map()
, and others similar to the one available on the Result
type. But, we won't use them, preferring the async
/await
syntax that we'll see later.