pub struct MultiFileUpload { /* private fields */ }
Expand description
Builder for uploading multiple files to pCloud.
This struct provides a convenient way to assemble a multipart form upload, either from in-memory data, raw bodies, or asynchronous streams.
Implementations§
Source§impl MultiFileUpload
impl MultiFileUpload
Sourcepub fn with_stream_entry<F, S>(
self,
filename: F,
length: Option<u64>,
stream: S,
) -> Self
pub fn with_stream_entry<F, S>( self, filename: F, length: Option<u64>, stream: S, ) -> Self
Adds a file stream to the upload and returns the updated builder.
This is a chainable version of MultiFileUpload::add_stream_entry
.
§Arguments
filename
- The name to assign to the uploaded file.length
- The size of the file in bytes.stream
- ATryStream
of bytes representing the file content.
Sourcepub fn add_stream_entry<F, S>(
&mut self,
filename: F,
length: Option<u64>,
stream: S,
)
pub fn add_stream_entry<F, S>( &mut self, filename: F, length: Option<u64>, stream: S, )
Adds a file stream to the upload.
§Arguments
filename
- The name to assign to the uploaded file.length
- The size of the file in bytes.stream
- ATryStream
of bytes representing the file content.
Sourcepub fn with_body_entry<F, B>(
self,
filename: F,
length: Option<u64>,
body: B,
) -> Self
pub fn with_body_entry<F, B>( self, filename: F, length: Option<u64>, body: B, ) -> Self
Adds a file from a raw body and returns the updated builder.
This is a chainable version of MultiFileUpload::add_body_entry
.
§Arguments
filename
- The name to assign to the uploaded file.length
- The size of the file in bytes.body
- Areqwest::Body
representing the file data.
Sourcepub fn add_body_entry<F, B>(
&mut self,
filename: F,
length: Option<u64>,
body: B,
)
pub fn add_body_entry<F, B>( &mut self, filename: F, length: Option<u64>, body: B, )
Adds a file from a raw body to the upload.
§Arguments
filename
- The name to assign to the uploaded file.length
- The size of the file in bytes.body
- Areqwest::Body
containing the file content.
Trait Implementations§
Source§impl Debug for MultiFileUpload
impl Debug for MultiFileUpload
Source§impl Default for MultiFileUpload
impl Default for MultiFileUpload
Source§fn default() -> MultiFileUpload
fn default() -> MultiFileUpload
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MultiFileUpload
impl !RefUnwindSafe for MultiFileUpload
impl Send for MultiFileUpload
impl Sync for MultiFileUpload
impl Unpin for MultiFileUpload
impl !UnwindSafe for MultiFileUpload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more