[−][src]Struct actix_http::Request
Request
Implementations
impl Request<PayloadStream>
[src]
pub fn new() -> Request<PayloadStream>
[src]
Create new Request instance
impl<P> Request<P>
[src]
pub fn with_payload(payload: Payload<P>) -> Request<P>
[src]
Create new Request instance
pub fn replace_payload<P1>(
self,
payload: Payload<P1>
) -> (Request<P1>, Payload<P>)
[src]
self,
payload: Payload<P1>
) -> (Request<P1>, Payload<P>)
Create new Request instance
pub fn payload(&mut self) -> &mut Payload<P>
[src]
Get request's payload
pub fn take_payload(&mut self) -> Payload<P>
[src]
Get request's payload
pub fn into_parts(self) -> (Message<RequestHead>, Payload<P>)
[src]
Split request into request head and payload
pub fn head(&self) -> &RequestHead
[src]
Http message part of the request
pub fn headers_mut(&mut self) -> &mut HeaderMap
[src]
Mutable reference to the message's headers.
pub fn uri(&self) -> &Uri
[src]
Request's uri.
pub fn uri_mut(&mut self) -> &mut Uri
[src]
Mutable reference to the request's uri.
pub fn method(&self) -> &Method
[src]
Read the Request method.
pub fn version(&self) -> Version
[src]
Read the Request Version.
pub fn path(&self) -> &str
[src]
The target path of this Request.
pub fn upgrade(&self) -> bool
[src]
Check if request requires connection upgrade
pub fn peer_addr(&self) -> Option<SocketAddr>
[src]
Peer socket address
Peer address is actual socket address, if proxy is used in front of actix http server, then peer address would be address of this proxy.
Trait Implementations
impl<P> Debug for Request<P>
[src]
impl From<Message<RequestHead>> for Request<PayloadStream>
[src]
pub fn from(head: Message<RequestHead>) -> Self
[src]
impl<P> HttpMessage for Request<P>
[src]
type Stream = P
Type of message payload stream
pub fn headers(&self) -> &HeaderMap
[src]
pub fn take_payload(&mut self) -> Payload<P>
[src]
pub fn extensions(&self) -> Ref<'_, Extensions>
[src]
Request extensions
pub fn extensions_mut(&self) -> RefMut<'_, Extensions>
[src]
Mutable reference to a the request's extensions
pub fn content_type(&self) -> &str
[src]
pub fn encoding(&self) -> Result<&'static Encoding, ContentTypeError>
[src]
pub fn mime_type(&self) -> Result<Option<Mime>, ContentTypeError>
[src]
pub fn chunked(&self) -> Result<bool, ParseError>
[src]
pub fn cookies(&self) -> Result<Ref<'_, Vec<Cookie<'static>>>, CookieParseError>
[src]
pub fn cookie(&self, name: &str) -> Option<Cookie<'static>>
[src]
impl Service<Request<Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>>> for ExpectHandler
[src]
type Response = Request
Responses given by the service.
type Error = Error
Errors produced by the service when polling readiness or executing call.
type Future = Ready<Result<Self::Response, Self::Error>>
The future response value.
pub fn poll_ready(
&mut self,
_: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
[src]
&mut self,
_: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
pub fn call(&mut self, req: Request) -> Self::Future
[src]
impl ServiceFactory<Request<Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>>> for ExpectHandler
[src]
type Response = Request
Responses given by the created services.
type Error = Error
Errors produced by the created services.
type Config = ()
Service factory configuration.
type Service = ExpectHandler
The kind of Service
created by this factory.
type InitError = Error
Errors potentially raised while building a service.
type Future = Ready<Result<Self::Service, Self::InitError>>
The future of the Service
instance.
pub fn new_service(&self, _: Self::Config) -> Self::Future
[src]
Auto Trait Implementations
impl<P = Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>> !RefUnwindSafe for Request<P>
[src]
impl<P = Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>> !Send for Request<P>
[src]
impl<P = Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>> !Sync for Request<P>
[src]
impl<P> Unpin for Request<P> where
P: Unpin,
[src]
P: Unpin,
impl<P = Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>> !UnwindSafe for Request<P>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,