[]Struct paperclip::actix::web::HttpResponse

pub struct HttpResponse<B = Body> { /* fields omitted */ }

An HTTP Response


impl Response<Body>

pub fn Ok() -> ResponseBuilder

pub fn Created() -> ResponseBuilder

pub fn Accepted() -> ResponseBuilder

pub fn NonAuthoritativeInformation() -> ResponseBuilder

pub fn NoContent() -> ResponseBuilder

pub fn ResetContent() -> ResponseBuilder

pub fn PartialContent() -> ResponseBuilder

pub fn MultiStatus() -> ResponseBuilder

pub fn AlreadyReported() -> ResponseBuilder

pub fn MultipleChoices() -> ResponseBuilder

pub fn MovedPermanently() -> ResponseBuilder

pub fn Found() -> ResponseBuilder

pub fn SeeOther() -> ResponseBuilder

pub fn NotModified() -> ResponseBuilder

pub fn UseProxy() -> ResponseBuilder

pub fn TemporaryRedirect() -> ResponseBuilder

pub fn PermanentRedirect() -> ResponseBuilder

pub fn BadRequest() -> ResponseBuilder

pub fn NotFound() -> ResponseBuilder

pub fn Unauthorized() -> ResponseBuilder

pub fn PaymentRequired() -> ResponseBuilder

pub fn Forbidden() -> ResponseBuilder

pub fn MethodNotAllowed() -> ResponseBuilder

pub fn NotAcceptable() -> ResponseBuilder

pub fn ProxyAuthenticationRequired() -> ResponseBuilder

pub fn RequestTimeout() -> ResponseBuilder

pub fn Conflict() -> ResponseBuilder

pub fn Gone() -> ResponseBuilder

pub fn LengthRequired() -> ResponseBuilder

pub fn PreconditionFailed() -> ResponseBuilder

pub fn PreconditionRequired() -> ResponseBuilder

pub fn PayloadTooLarge() -> ResponseBuilder

pub fn UriTooLong() -> ResponseBuilder

pub fn UnsupportedMediaType() -> ResponseBuilder

pub fn RangeNotSatisfiable() -> ResponseBuilder

pub fn ExpectationFailed() -> ResponseBuilder

pub fn UnprocessableEntity() -> ResponseBuilder

pub fn TooManyRequests() -> ResponseBuilder

pub fn InternalServerError() -> ResponseBuilder

pub fn NotImplemented() -> ResponseBuilder

pub fn BadGateway() -> ResponseBuilder

pub fn ServiceUnavailable() -> ResponseBuilder

pub fn GatewayTimeout() -> ResponseBuilder

pub fn VersionNotSupported() -> ResponseBuilder

pub fn VariantAlsoNegotiates() -> ResponseBuilder

pub fn InsufficientStorage() -> ResponseBuilder

pub fn LoopDetected() -> ResponseBuilder

impl Response<Body>

pub fn build(status: StatusCode) -> ResponseBuilder

Create http response builder with specific status.

pub fn build_from<T>(source: T) -> ResponseBuilder where
    T: Into<ResponseBuilder>, 

Create http response builder

Important traits for Response<Body>
pub fn new(status: StatusCode) -> Response<Body>

Constructs a response

Important traits for Response<Body>
pub fn from_error(error: Error) -> Response<Body>

Constructs an error response

Important traits for Response<Body>
pub fn into_body<B>(self) -> Response<B>

Convert response to response with body

impl<B> Response<B>

Important traits for Response<Body>
pub fn with_body(status: StatusCode, body: B) -> Response<B>

Constructs a response with body

pub fn head(&self) -> &ResponseHead

Http message part of the response

pub fn head_mut(&mut self) -> &mut ResponseHead

Mutable reference to a http message part of the response

pub fn error(&self) -> Option<&Error>

The source error for this response

pub fn status(&self) -> StatusCode

Get the response status code

pub fn status_mut(&mut self) -> &mut StatusCode

Set the StatusCode for this response

pub fn headers(&self) -> &HeaderMap

Get the headers from the response

pub fn headers_mut(&mut self) -> &mut HeaderMap

Get a mutable reference to the headers

pub fn cookies(&self) -> CookieIter

Get an iterator for the cookies set by this response

Add a cookie to this response

Remove all cookies with the given name from this response. Returns the number of cookies removed.

pub fn upgrade(&self) -> bool

Connection upgrade status

pub fn keep_alive(&self) -> bool

Keep-alive status for this connection

pub fn extensions(&self) -> Ref<Extensions>

Responses extensions

pub fn extensions_mut(&mut self) -> RefMut<Extensions>

Mutable reference to a the response's extensions

pub fn body(&self) -> &ResponseBody<B>

Get body of this response

Important traits for Response<Body>
pub fn set_body<B2>(self, body: B2) -> Response<B2>

Set a body

pub fn into_parts(self) -> (Response<()>, ResponseBody<B>)

Split response and body

Important traits for Response<Body>
pub fn drop_body(self) -> Response<()>

Drop request's body

Important traits for Response<Body>
pub fn map_body<F, B2>(self, f: F) -> Response<B2> where
    F: FnOnce(&mut ResponseHead, ResponseBody<B>) -> ResponseBody<B2>, 

Set a body and return previous body value

pub fn take_body(&mut self) -> ResponseBody<B>

Extract response body

Trait Implementations

impl Apiv2Schema for Response<Body>[src]

impl<B> BodyEncoding for Response<B>

impl<B> Debug for Response<B> where
    B: MessageBody, 

impl<'a> From<&'a String> for Response<Body>

impl From<&'static [u8]> for Response<Body>

impl From<&'static str> for Response<Body>

impl From<Bytes> for Response<Body>

impl From<BytesMut> for Response<Body>

impl From<Error> for Response<Body>

Convert Error to a Response instance

impl From<ResponseBuilder> for Response<Body>

impl<I, E> From<Result<I, E>> for Response<Body> where
    E: Into<Error>,
    I: Into<Response<Body>>, 

Helper converters

impl From<String> for Response<Body>

impl Future for Response<Body>

type Output = Result<Response<Body>, Error>

The type of value produced on completion.

impl OperationModifier for Response<Body>[src]

impl Responder for Response<Body>

type Error = Error

The associated error which can be returned.

type Future = Ready<Result<Response<Body>, Error>>

The future response value.

Auto Trait Implementations

impl<B = Body> !RefUnwindSafe for Response<B>

impl<B = Body> !Send for Response<B>

impl<B = Body> !Sync for Response<B>

impl<B> Unpin for Response<B>

impl<B = Body> !UnwindSafe for Response<B>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Apiv2Schema for T where
    T: TypedData

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future + ?Sized

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,