Skip to main content

Mode

Trait Mode 

Source
pub trait Mode: Sealed {
    const KEEP_CONN: bool;
}
Expand description

Marker trait implemented by the connection modes of Client.

This trait is sealed: ShortConn and KeepAlive are its only implementors and no other type can implement it, which keeps the set of connection modes closed and allows it to gain new members without breaking downstream code.

use fastcgi_client::conn::Mode;

enum MyMode {}

// error: the trait bound `MyMode: Sealed` is not satisfied
impl Mode for MyMode {
    const KEEP_CONN: bool = true;
}

Required Associated Constants§

Source

const KEEP_CONN: bool

Value of the FCGI_KEEP_CONN flag sent in the FCGI_BEGIN_REQUEST record.

When false, the FastCGI server closes the connection after responding.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§