pub struct Request<'a, I: AsyncRead + Unpin> { /* private fields */ }Expand description
FastCGI request containing parameters and stdin data.
This structure represents a complete FastCGI request with all necessary parameters and an optional stdin stream for request body data.
Implementations§
Source§impl<'a, I: AsyncRead + Unpin> Request<'a, I>
impl<'a, I: AsyncRead + Unpin> Request<'a, I>
Sourcepub fn new(params: Params<'a>, stdin: I) -> Self
pub fn new(params: Params<'a>, stdin: I) -> Self
Creates a new FastCGI request with the given parameters and stdin.
§Arguments
params- The FastCGI parametersstdin- The stdin stream for request body data
Sourcepub fn params_mut(&mut self) -> &mut Params<'a>
pub fn params_mut(&mut self) -> &mut Params<'a>
Returns a mutable reference to the request parameters.
Sourcepub fn try_into_http(self) -> HttpConversionResult<Request<I>>
Available on crate feature http only.
pub fn try_into_http(self) -> HttpConversionResult<Request<I>>
http only.Converts a FastCGI request into an http::Request without buffering the
body.
Source§impl<I> Request<'static, I>
impl<I> Request<'static, I>
Sourcepub fn try_from_http_with<'a>(
request: Request<I>,
extras: Params<'a>,
) -> HttpConversionResult<Self>
Available on crate feature http only.
pub fn try_from_http_with<'a>( request: Request<I>, extras: Params<'a>, ) -> HttpConversionResult<Self>
http only.Builds a FastCGI request from an http::Request, merging
caller-provided FastCGI extras such as SCRIPT_FILENAME.
Sourcepub fn try_from_http(request: Request<I>) -> HttpConversionResult<Self>
Available on crate feature http only.
pub fn try_from_http(request: Request<I>) -> HttpConversionResult<Self>
http only.Builds a FastCGI request from an http::Request using only
HTTP-representable metadata.
Source§impl<'a, I> Request<'a, TokioCompat<I>>
impl<'a, I> Request<'a, TokioCompat<I>>
Sourcepub fn new_tokio(params: Params<'a>, stdin: I) -> Self
Available on crate feature tokio only.
pub fn new_tokio(params: Params<'a>, stdin: I) -> Self
tokio only.Creates a new FastCGI request from a Tokio reader.
Requires the optional tokio feature; it merely wraps the reader with
tokio_util::compat before
delegating to Request::new.