[−][src]Struct actix_web::dev::ServiceFromRequest
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 headers(&self) -> &HeaderMap
[src]
fn extensions(&self) -> Ref<Extensions>
[src]
Request extensions
fn extensions_mut(&self) -> RefMut<Extensions>
[src]
Mutable reference to a the request's extensions
fn take_payload(&mut self) -> Payload<Self::Stream>
[src]
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]
&self
) -> Result<&'static (dyn Encoding + 'static + Sync + Send), ContentTypeError>
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]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.