pub struct Responder<EP: EndpointDetails>(pub EP::ResponseType);Expand description
The actix_web::Responder used for almost all API endpoints, EndpointDetails together with an
instance of Result<EndpointDetails::ResponseType>.
Tuple Fields§
§0: EP::ResponseTypeImplementations§
Source§impl<EP: EndpointDetails> Responder<EP>
impl<EP: EndpointDetails> Responder<EP>
pub fn into_cached(self) -> CachedResponse<EP>
Trait Implementations§
Source§impl<EP: EndpointDetails> Responder for Responder<EP>
impl<EP: EndpointDetails> Responder for Responder<EP>
type Body = <CachedResponse<EP> as Responder>::Body
Source§fn respond_to(self, req: &HttpRequest) -> HttpResponse<Self::Body>
fn respond_to(self, req: &HttpRequest) -> HttpResponse<Self::Body>
Convert self to
HttpResponse.Auto Trait Implementations§
impl<EP> Freeze for Responder<EP>
impl<EP> RefUnwindSafe for Responder<EP>
impl<EP> Send for Responder<EP>
impl<EP> Sync for Responder<EP>
impl<EP> Unpin for Responder<EP>
impl<EP> UnsafeUnpin for Responder<EP>
impl<EP> UnwindSafe for Responder<EP>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more