[][src]Struct actix_web::dev::ServiceFromRequest

pub struct ServiceFromRequest<P> { /* fields omitted */ }

Methods

impl<P> ServiceFromRequest<P>[src]

pub fn request(&self) -> &HttpRequest[src]

Get reference to inner HttpRequest

pub fn into_request(self) -> HttpRequest[src]

Convert this request into a HttpRequest

pub fn match_info_mut(&mut self) -> &mut Path<Url>[src]

Get match information for this request

pub fn error_response<E: Into<Error>>(self, err: E) -> ServiceResponse[src]

Create service response for error

pub fn route_data<T: 'static>(&self) -> Option<&RouteData<T>>[src]

Load route data. Route data could be set during route configuration with Route::data() method.

Trait Implementations

impl<P> HttpMessage for ServiceFromRequest<P>[src]

type Stream = P

Type of message payload stream

fn extensions(&self) -> Ref<Extensions>[src]

Request extensions

fn extensions_mut(&self) -> RefMut<Extensions>[src]

Mutable reference to a the request's extensions

fn content_type(&self) -> &str[src]

Read the request content type. If request does not contain Content-Type header, empty str get returned. Read more

fn encoding(
    &self
) -> Result<&'static (dyn Encoding + 'static + Sync + Send), ContentTypeError>
[src]

Get content type encoding Read more

fn mime_type(&self) -> Result<Option<Mime>, ContentTypeError>[src]

Convert the request content type to a known mime type.

fn chunked(&self) -> Result<bool, ParseError>[src]

Check if request has chunked transfer encoding

fn cookies(&self) -> Result<Ref<Vec<Cookie<'static>>>, ParseError>[src]

Load request cookies.

fn cookie(&self, name: &str) -> Option<Cookie<'static>>[src]

Return request cookie.

Auto Trait Implementations

impl<P> !Send for ServiceFromRequest<P>

impl<P> !Sync for ServiceFromRequest<P>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

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

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Erased for T