Struct actix_web::dev::ServiceRequest [−][src]
pub struct ServiceRequest(_);
Expand description
An service http request
ServiceRequest allows mutable access to request’s internal structures
Implementations
Deconstruct request into parts
Construct request from parts.
ServiceRequest
can be re-constructed only if req
hasn’t been cloned.
Construct request from request.
HttpRequest
implements Clone
trait via Rc
type. ServiceRequest
can be re-constructed only if rc’s strong pointers count eq 1 and
weak pointers count is 0.
Create service response
Create service response for error
This method returns reference to the request head
This method returns reference to the request head
Returns mutable request’s headers.
The query string in the URL.
E.g., id=10
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.
To get client connection information ConnectionInfo
should be used.
Get ConnectionInfo for the current request.
Get a reference to the Path parameters.
Params is a container for url parameters.
A variable segment is specified in the form {identifier}
,
where the identifier can be used later in a request handler to
access the matched value for that segment.
Counterpart to HttpRequest::match_name
.
Counterpart to HttpRequest::match_pattern
.
Get a mutable reference to the Path parameters.
Get a reference to a ResourceMap
of current application.
Service configuration
Counterpart to HttpRequest::app_data
.
Set request payload.
Trait Implementations
Request extensions
Mutable reference to a the request’s extensions
type Stream = PayloadStream
type Stream = PayloadStream
Type of message payload stream
Message payload stream
Read the request content type. If request does not contain Content-Type header, empty str get returned. Read more
Get content type encoding Read more
Convert the request content type to a known mime type.
Check if request has chunked transfer encoding
Load request cookies.
Return request cookie.
Auto Trait Implementations
impl !RefUnwindSafe for ServiceRequest
impl !Send for ServiceRequest
impl !Sync for ServiceRequest
impl Unpin for ServiceRequest
impl !UnwindSafe for ServiceRequest
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more