pub struct NtexResponse<S: ResponseCode = StatusCode>(/* private fields */);
Expand description
An HTTP response for ntex
.
Trait Implementations§
Source§impl<S: ResponseCode> From<Response<S>> for NtexResponse<S>
impl<S: ResponseCode> From<Response<S>> for NtexResponse<S>
Source§impl<S: ResponseCode> Responder for NtexResponse<S>
impl<S: ResponseCode> Responder for NtexResponse<S>
Source§async fn respond_to(self, req: &HttpRequest) -> HttpResponse
async fn respond_to(self, req: &HttpRequest) -> HttpResponse
Convert itself to http response.
Source§fn with_status(self, status: StatusCode) -> CustomResponder<Self, Err>where
Self: Sized,
fn with_status(self, status: StatusCode) -> CustomResponder<Self, Err>where
Self: Sized,
Override a status code for a Responder. Read more
Source§fn with_header<K, V>(self, key: K, value: V) -> CustomResponder<Self, Err>where
Self: Sized,
HeaderName: TryFrom<K>,
HeaderValue: TryFrom<V>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
<HeaderValue as TryFrom<V>>::Error: Into<Error>,
fn with_header<K, V>(self, key: K, value: V) -> CustomResponder<Self, Err>where
Self: Sized,
HeaderName: TryFrom<K>,
HeaderValue: TryFrom<V>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
<HeaderValue as TryFrom<V>>::Error: Into<Error>,
Add header to the Responder’s response. Read more
Auto Trait Implementations§
impl<S = StatusCode> !Freeze for NtexResponse<S>
impl<S> RefUnwindSafe for NtexResponse<S>where
<S as ResponseCode>::ErrorCode: RefUnwindSafe,
<S as ResponseCode>::BusinessCode: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for NtexResponse<S>
impl<S> Sync for NtexResponse<S>
impl<S> Unpin for NtexResponse<S>
impl<S> UnwindSafe for NtexResponse<S>where
<S as ResponseCode>::ErrorCode: UnwindSafe,
<S as ResponseCode>::BusinessCode: UnwindSafe,
S: UnwindSafe,
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