#[non_exhaustive]pub enum RequestPayload {
Single(Body),
Multipart(Multipart),
Negotiated(NegotiatedBody),
}Expand description
An operation’s request payload, when it declares one.
The three cases are mutually exclusive by construction, replacing what will
otherwise be several mutually-exclusive Option fields on Operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Single(Body)
A single supported content type (JSON, text/plain, or form), extracted
directly by the matching axum extractor.
Multipart(Multipart)
A multipart/form-data body, decoded by a generated Multipart
extractor.
Negotiated(NegotiatedBody)
Several supported content types, dispatched at request time on the
incoming Content-Type header by a generated NegotiatedBody
FromRequest enum. An unrecognised or missing content type yields a
415 Unsupported Media Type.
Trait Implementations§
Source§impl Clone for RequestPayload
impl Clone for RequestPayload
Source§fn clone(&self) -> RequestPayload
fn clone(&self) -> RequestPayload
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 moreSource§impl Debug for RequestPayload
impl Debug for RequestPayload
Source§impl PartialEq for RequestPayload
impl PartialEq for RequestPayload
impl StructuralPartialEq for RequestPayload
Auto Trait Implementations§
impl Freeze for RequestPayload
impl RefUnwindSafe for RequestPayload
impl Send for RequestPayload
impl Sync for RequestPayload
impl Unpin for RequestPayload
impl UnsafeUnpin for RequestPayload
impl UnwindSafe for RequestPayload
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