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§
source§impl 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.
source§impl 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§
source§impl Default for RequestBodyBuilder
impl Default for RequestBodyBuilder
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.
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§
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