Skip to content

quasi-coherent/multipart-write

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multipart-write


Description

This crate contains the trait MultipartWrite, assorted implementations, and combinators.

A MultipartWrite is a similar interface to Sink, except that writing an item or completing the write both return values.

Here is a conceptual example of a MultipartWrite.

Motivation

Sink is a useful API, but it is just that: a sink, the end of a stream. It's valuable to have the backpressure mechanism that poll_ready combined with start_send enables, and it's nice to have the flexibility that the shape of Sink provides in what kinds of values you can send with it.

The idea for MultipartWrite is to:

  1. Have those same desirable properies: backpressure and generic input type.
  2. Be able to be inserted earlier in a stream computation.
  3. Replace Sink when the use case would need a value returned by sending to it or closing it.
  4. Transform a stream by writing it in parts, which is somewhat of a specific rephrasing of the second and third points.

About

Asynchronous multipart writers

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages