Struct utoipa::openapi::request_body::RequestBody
source · [−]#[non_exhaustive]pub struct RequestBody {
pub description: Option<String>,
pub content: HashMap<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: HashMap<String, Content>
Map of request body contents mapped by content type e.g. application/json
.
required: Option<Required>
Determines whether request body is reuqired in the request or not.
Implementations
sourceimpl RequestBody
impl RequestBody
sourcepub fn new() -> Self
pub fn new() -> Self
Constrcut a new RequestBody
.
Trait Implementations
sourceimpl Clone for RequestBody
impl Clone for RequestBody
sourcefn clone(&self) -> RequestBody
fn clone(&self) -> RequestBody
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for RequestBody
impl Default for RequestBody
sourcefn default() -> RequestBody
fn default() -> RequestBody
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for RequestBody
impl<'de> Deserialize<'de> for RequestBody
sourcefn 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
sourceimpl From<RequestBody> for RequestBodyBuilder
impl From<RequestBody> for RequestBodyBuilder
sourcefn from(value: RequestBody) -> Self
fn from(value: RequestBody) -> Self
Converts to this type from the input type.
sourceimpl From<RequestBodyBuilder> for RequestBody
impl From<RequestBodyBuilder> for RequestBody
sourcefn from(value: RequestBodyBuilder) -> Self
fn from(value: RequestBodyBuilder) -> Self
Converts to this type from the input type.
sourceimpl Serialize for RequestBody
impl Serialize for RequestBody
Auto Trait Implementations
impl RefUnwindSafe for RequestBody
impl Send for RequestBody
impl Sync for RequestBody
impl Unpin for RequestBody
impl UnwindSafe for RequestBody
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more