pub struct BufferedUpload { /* private fields */ }Expand description
An uploaded file fully buffered in memory as a sequence of chunks.
During multipart parsing all chunks are collected into memory before the
struct is returned. The chunk() and
into_reader() methods replay from this buffer.
Implementations§
Source§impl BufferedUpload
impl BufferedUpload
Sourcepub fn content_type(&self) -> &str
pub fn content_type(&self) -> &str
The MIME content type.
Sourcepub async fn chunk(&mut self) -> Option<Result<Bytes, Error>>
pub async fn chunk(&mut self) -> Option<Result<Bytes, Error>>
Read the next chunk. Returns None when all chunks are consumed.
Auto Trait Implementations§
impl Freeze for BufferedUpload
impl RefUnwindSafe for BufferedUpload
impl Send for BufferedUpload
impl Sync for BufferedUpload
impl Unpin for BufferedUpload
impl UnsafeUnpin for BufferedUpload
impl UnwindSafe for BufferedUpload
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