Struct utoipa::openapi::response::ResponsesBuilder
source · pub struct ResponsesBuilder { /* private fields */ }
Expand description
Implementations§
source§impl ResponsesBuilder
impl ResponsesBuilder
sourcepub fn new() -> ResponsesBuilder
pub fn new() -> ResponsesBuilder
Constructs a new ResponsesBuilder
.
source§impl ResponsesBuilder
impl ResponsesBuilder
sourcepub fn response<S: Into<String>, R: Into<RefOr<Response>>>(
self,
code: S,
response: R,
) -> Self
pub fn response<S: Into<String>, R: Into<RefOr<Response>>>( self, code: S, response: R, ) -> Self
Add a Response
.
sourcepub fn responses_from_iter<I: IntoIterator<Item = (C, R)>, C: Into<String>, R: Into<RefOr<Response>>>(
self,
iter: I,
) -> Self
pub fn responses_from_iter<I: IntoIterator<Item = (C, R)>, C: Into<String>, R: Into<RefOr<Response>>>( self, iter: I, ) -> Self
Add responses from an iterator over a pair of (status_code, response): (String, Response)
.
sourcepub fn responses_from_into_responses<I: IntoResponses>(self) -> Self
pub fn responses_from_into_responses<I: IntoResponses>(self) -> Self
Add responses from a type that implements IntoResponses
.
Trait Implementations§
source§impl Default for ResponsesBuilder
impl Default for ResponsesBuilder
source§impl From<Responses> for ResponsesBuilder
impl From<Responses> for ResponsesBuilder
source§impl From<ResponsesBuilder> for Responses
impl From<ResponsesBuilder> for Responses
source§fn from(value: ResponsesBuilder) -> Self
fn from(value: ResponsesBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ResponsesBuilder
impl RefUnwindSafe for ResponsesBuilder
impl Send for ResponsesBuilder
impl Sync for ResponsesBuilder
impl Unpin for ResponsesBuilder
impl UnwindSafe for ResponsesBuilder
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