Struct discord_flows::http::multipart::Multipart
source · pub struct Multipart<'a> {
pub files: Vec<AttachmentType<'a>>,
pub fields: Vec<(Cow<'static, str>, Cow<'static, str>)>,
pub payload_json: Option<Value>,
}Expand description
Holder for multipart body. Contains files, multipart fields, and payload_json for creating requests with attachments.
Fields§
§files: Vec<AttachmentType<'a>>§fields: Vec<(Cow<'static, str>, Cow<'static, str>)>Multipart text fields that are sent with the form data as individual
fields. If a certain endpoint does not support passing JSON body via
payload_json, this must be used instead.
payload_json: Option<Value>JSON body that will be stringified and set as the form value as
payload_json.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Multipart<'a>
impl<'a> Send for Multipart<'a>
impl<'a> Sync for Multipart<'a>
impl<'a> Unpin for Multipart<'a>
impl<'a> UnwindSafe for Multipart<'a>
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