futures-rs v0.1.11 Release Notes

Release Date: 2017-03-13 // about 7 years ago
  • ๐Ÿš€ The major highlight of this release is the addition of a new "default" method on the Sink trait, Sink::close. This method is used to indicate to a sink that no new values will ever need to get pushed into it. This can be used to implement graceful shutdown of protocols and otherwise simply indicates to a sink that it can start freeing up resources.

    Currently this method is not a default method to preserve backwards 0๏ธโƒฃ compatibility, but it's intended to become a default method in the 0.2 series of the futures crate. It's highly recommended to audit implementations of Sink to implement the close method as is fit.

    ๐Ÿš€ Other changes in this release are:

    • A new select combinator, Future::select2 was added for a heterogeneous select.
    • ๐Ÿ‘€ A Shared::peek method was added to check to see if it's done.
    • Sink::map_err was implemented
    • ๐Ÿšš The log dependency was removed
    • Implementations of the Debug trait are now generally available.
    • The stream::IterStream type was renamed to stream::Iter (with a reexport for the old name).
    • โž• Add a Sink::wait method which returns an adapter to use an arbitrary Sink synchronously.
    • A Stream::concat method was added to concatenate a sequence of lists.
    • The oneshot::Sender::complete method was renamed to send and now returns a Result indicating successful transmission of a message or not. Note that the complete method still exists, it's just deprecated.