Struct utoipa::openapi::request_body::RequestBody
source · #[non_exhaustive]pub struct RequestBody {
pub description: Option<String>,
pub content: BTreeMap<String, Content>,
pub required: Option<Required>,
}
Expand description
Implements OpenAPI Request Body.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.description: Option<String>
Additional description of RequestBody
supporting markdown syntax.
content: BTreeMap<String, Content>
Map of request body contents mapped by content type e.g. application/json
.
required: Option<Required>
Determines whether request body is required in the request or not.
Implementations§
source§impl RequestBody
impl RequestBody
sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new RequestBody
.
Trait Implementations§
source§impl Clone for RequestBody
impl Clone for RequestBody
source§fn clone(&self) -> RequestBody
fn clone(&self) -> RequestBody
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for RequestBody
impl Default for RequestBody
source§fn default() -> RequestBody
fn default() -> RequestBody
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RequestBody
impl<'de> Deserialize<'de> for RequestBody
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<RequestBody> for RequestBodyBuilder
impl From<RequestBody> for RequestBodyBuilder
source§fn from(value: RequestBody) -> Self
fn from(value: RequestBody) -> Self
Converts to this type from the input type.
source§impl From<RequestBodyBuilder> for RequestBody
impl From<RequestBodyBuilder> for RequestBody
source§fn from(value: RequestBodyBuilder) -> Self
fn from(value: RequestBodyBuilder) -> Self
Converts to this type from the input type.
source§impl PartialEq for RequestBody
impl PartialEq for RequestBody
source§impl Serialize for RequestBody
impl Serialize for RequestBody
impl StructuralPartialEq for RequestBody
Auto Trait Implementations§
impl Freeze for RequestBody
impl RefUnwindSafe for RequestBody
impl Send for RequestBody
impl Sync for RequestBody
impl Unpin for RequestBody
impl UnwindSafe for RequestBody
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)