pub struct FastCgiTransport { /* private fields */ }Expand description
FastCGI transport: connects to a FastCGI server (e.g. PHP-FPM) and translates HTTP requests into the FastCGI wire protocol.
Implementations§
Source§impl FastCgiTransport
impl FastCgiTransport
Sourcepub fn new(
addr: String,
script_root: String,
index: Vec<String>,
split_path: Option<String>,
env: HashMap<String, String>,
) -> Self
pub fn new( addr: String, script_root: String, index: Vec<String>, split_path: Option<String>, env: HashMap<String, String>, ) -> Self
Create a new FastCGI transport from configuration values.
Sourcepub async fn send_request(
&self,
req: &Parts,
body: &[u8],
) -> Result<Response<Body>, ProxyError>
pub async fn send_request( &self, req: &Parts, body: &[u8], ) -> Result<Response<Body>, ProxyError>
Send an HTTP request to the FastCGI server and return the response.
Trait Implementations§
Source§impl Handler for FastCgiTransport
impl Handler for FastCgiTransport
Source§fn handle<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
_depot: &'life2 mut Depot,
res: &'life3 mut Response,
ctrl: &'life4 mut FlowCtrl,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn handle<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
_depot: &'life2 mut Depot,
res: &'life3 mut Response,
ctrl: &'life4 mut FlowCtrl,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Handle http request.
Source§fn arc(self) -> ArcHandlerwhere
Self: Sized,
fn arc(self) -> ArcHandlerwhere
Self: Sized,
Wrap to
ArcHandler.Source§fn hoop<H>(self, hoop: H) -> HoopedHandler
fn hoop<H>(self, hoop: H) -> HoopedHandler
Hoop this handler with middleware.
Auto Trait Implementations§
impl Freeze for FastCgiTransport
impl RefUnwindSafe for FastCgiTransport
impl Send for FastCgiTransport
impl Sync for FastCgiTransport
impl Unpin for FastCgiTransport
impl UnsafeUnpin for FastCgiTransport
impl UnwindSafe for FastCgiTransport
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more