Struct pemmican::config::Config[][src]

pub struct Config {
    pub num_threads: usize,
    pub shutdown_timeout: Duration,
    pub keep_alive: bool,

Configuration settings for a Pemmican server instance


Number of threads for the CpuPool. Note that handler functions are run on the main thread, and you must use pemmican.pool if you want to run code on a separate thread in the Pemmican CpuPool. Defaults to 4.

Configure the amount of time the server will wait for a "graceful shutdown". This is the amount of time after the shutdown signal is received the server will wait for all pending connections to finish. If the timeout elapses then the server will be forcibly shut down. Defaults to 1s.

Enable or disable Keep-alive. Default is true.

Trait Implementations

impl Default for Config

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Config

impl Sync for Config