pub enum RequestPart {
Start {
name: Option<String>,
filename: Option<String>,
content_type: Option<String>,
},
Data(Bytes),
End,
}Expand description
One element of a streamed multipart/form-data request.
The plugin emits, per field: one RequestPart::Start, zero or more
RequestPart::Data chunks, then one RequestPart::End. The channel
closing signals “no more parts”.
Variants§
Start
A new part begins. name is the form field name; filename is set for
file parts (None for plain fields); content_type is the part’s
declared Content-Type, if any.
Data(Bytes)
A chunk of the current part’s body.
End
The current part is complete.
Trait Implementations§
Source§impl Clone for RequestPart
impl Clone for RequestPart
Source§fn clone(&self) -> RequestPart
fn clone(&self) -> RequestPart
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for RequestPart
impl RefUnwindSafe for RequestPart
impl Send for RequestPart
impl Sync for RequestPart
impl Unpin for RequestPart
impl UnsafeUnpin for RequestPart
impl UnwindSafe for RequestPart
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