pub struct ResponsesBuilder { /* private fields */ }
Expand description
Implementations
sourceimpl ResponsesBuilder
impl ResponsesBuilder
sourcepub fn new() -> ResponsesBuilder
pub fn new() -> ResponsesBuilder
Constructs a new ResponsesBuilder
.
sourceimpl ResponsesBuilder
impl ResponsesBuilder
sourcepub fn response<S: Into<String>, R: Into<Response>>(
self,
code: S,
response: R
) -> Self
pub fn response<S: Into<String>, R: Into<Response>>(
self,
code: S,
response: R
) -> Self
Add a Response
.
sourcepub fn responses_from_iter<I: Iterator<Item = (C, R)>, C: Into<String>, R: Into<Response>>(
self,
iter: I
) -> Self
pub fn responses_from_iter<I: Iterator<Item = (C, R)>, C: Into<String>, R: Into<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
sourceimpl Default for ResponsesBuilder
impl Default for ResponsesBuilder
sourceimpl From<Responses> for ResponsesBuilder
impl From<Responses> for ResponsesBuilder
sourceimpl From<ResponsesBuilder> for Responses
impl From<ResponsesBuilder> for Responses
sourcefn from(value: ResponsesBuilder) -> Self
fn from(value: ResponsesBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for ResponsesBuilder
impl Send for ResponsesBuilder
impl Sync for ResponsesBuilder
impl Unpin for ResponsesBuilder
impl UnwindSafe for ResponsesBuilder
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