Struct utoipa::openapi::request_body::RequestBodyBuilder
source · [−]pub struct RequestBodyBuilder { /* private fields */ }
Expand description
Builder for RequestBody
with chainable configuration methods to create a new RequestBody
.
Implementations
sourceimpl RequestBodyBuilder
impl RequestBodyBuilder
sourcepub fn new() -> RequestBodyBuilder
pub fn new() -> RequestBodyBuilder
Constructs a new RequestBodyBuilder
.
sourcepub fn build(self) -> RequestBody
pub fn build(self) -> RequestBody
Constructs a new RequestBody
taking all fields values from this object.
sourceimpl RequestBodyBuilder
impl RequestBodyBuilder
sourcepub fn description<S: Into<String>>(self, description: Option<S>) -> Self
pub fn description<S: Into<String>>(self, description: Option<S>) -> Self
Add description for RequestBody
.
sourcepub fn required(self, required: Option<Required>) -> Self
pub fn required(self, required: Option<Required>) -> Self
Define RequestBody
required.
Trait Implementations
sourceimpl Default for RequestBodyBuilder
impl Default for RequestBodyBuilder
sourcefn default() -> RequestBodyBuilder
fn default() -> RequestBodyBuilder
Returns the “default value” for a type. 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.
Auto Trait Implementations
impl RefUnwindSafe for RequestBodyBuilder
impl Send for RequestBodyBuilder
impl Sync for RequestBodyBuilder
impl Unpin for RequestBodyBuilder
impl UnwindSafe for RequestBodyBuilder
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