Skip to main content

BlobUploadBody

Type Alias BlobUploadBody 

Source
pub type BlobUploadBody = Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send>>;
Expand description

Request body for JmapClient::upload_blob_stream: a stream of byte chunks sent to the server in order.

Build one with Box::pin(stream) from any Stream<Item = Result<Bytes, std::io::Error>> + Send + 'static, or with upload_body_from_reader from a tokio::io::AsyncRead. A stream with another error type can be adapted with .map_err(std::io::Error::other). An Err item aborts the upload and surfaces as ClientError::Http.

Aliased Type§

#[repr(transparent)]
pub struct BlobUploadBody { /* private fields */ }