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
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 RequestBodyExt for RequestBodyBuilder
impl RequestBodyExt for RequestBodyBuilder
sourcefn json_component_ref(self, ref_name: &str) -> RequestBodyBuilder
fn json_component_ref(self, ref_name: &str) -> RequestBodyBuilder
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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