Struct fastcgi_client::client::Client
source · [−]pub struct Client<S, M> { /* private fields */ }
Expand description
Async client for handling communication between fastcgi server.
Implementations
sourceimpl<S: AsyncRead + AsyncWrite + Unpin> Client<S, ShortConn>
impl<S: AsyncRead + AsyncWrite + Unpin> Client<S, ShortConn>
sourcepub fn new(stream: S) -> Self
pub fn new(stream: S) -> Self
Construct a Client
Object with stream, such as tokio::net::TcpStream
or tokio::net::UnixStream
, under short connection mode.
sourcepub async fn execute_once<I: AsyncRead + Unpin>(
self,
request: Request<'_, I>
) -> ClientResult<Response>
pub async fn execute_once<I: AsyncRead + Unpin>(
self,
request: Request<'_, I>
) -> ClientResult<Response>
Send request and receive response from fastcgi server, under short connection mode.
sourceimpl<S: AsyncRead + AsyncWrite + Unpin> Client<S, KeepAlive>
impl<S: AsyncRead + AsyncWrite + Unpin> Client<S, KeepAlive>
sourcepub fn new_keep_alive(stream: S) -> Self
pub fn new_keep_alive(stream: S) -> Self
Construct a Client
Object with stream, such as tokio::net::TcpStream
or tokio::net::UnixStream
, under keep alive connection mode.
Auto Trait Implementations
impl<S, M> RefUnwindSafe for Client<S, M> where
M: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, M> Send for Client<S, M> where
M: Send,
S: Send,
impl<S, M> Sync for Client<S, M> where
M: Sync,
S: Sync,
impl<S, M> Unpin for Client<S, M> where
M: Unpin,
S: Unpin,
impl<S, M> UnwindSafe for Client<S, M> where
M: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more