pub struct Part<'m> { /* private fields */ }Expand description
One part of a multipart request, borrowed from the Multipart it came
from (parts are sequential — finish one before asking for the next).
Implementations§
Source§impl Part<'_>
impl Part<'_>
Sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
The part’s own content-type header, when given.
Sourcepub async fn chunk(&mut self) -> Result<Option<Bytes>>
pub async fn chunk(&mut self) -> Result<Option<Bytes>>
The next chunk of this part’s data, or None at the part’s end.
Chunked reads are bounded by the route’s cumulative body_limit, not
the per-part cap — use them to process big uploads without buffering.
Auto Trait Implementations§
impl<'m> !RefUnwindSafe for Part<'m>
impl<'m> !Sync for Part<'m>
impl<'m> !UnwindSafe for Part<'m>
impl<'m> Freeze for Part<'m>
impl<'m> Send for Part<'m>
impl<'m> Unpin for Part<'m>
impl<'m> UnsafeUnpin for Part<'m>
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