pub enum ShortConn {}Expand description
Short connection mode.
The FCGI_KEEP_CONN flag is not set, so the FastCGI server closes the
connection after it finished responding. Consequently the request methods of
Client<S, ShortConn> consume the client, and a new stream
is needed for the next request.
This type is a compile time marker and cannot be instantiated:
ⓘ
use fastcgi_client::conn::ShortConn;
// error: expected value, found enum `ShortConn`
let _mode = ShortConn;A short connection client is consumed by its request methods, so it cannot be reused:
ⓘ
use fastcgi_client::{io, Client, Params, Request};
let stream = smol::net::TcpStream::connect(("127.0.0.1", 9000))
.await
.unwrap();
let client = Client::new(stream);
let _ = client
.execute_once(Request::new(Params::default(), io::empty()))
.await;
// error[E0382]: use of moved value: `client`
let _ = client
.execute_once(Request::new(Params::default(), io::empty()))
.await;Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShortConn
impl RefUnwindSafe for ShortConn
impl Send for ShortConn
impl Sync for ShortConn
impl Unpin for ShortConn
impl UnsafeUnpin for ShortConn
impl UnwindSafe for ShortConn
Blanket Implementations§
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