Struct humphrey_server::config::config::Config[][src]

pub struct Config {
    pub address: String,
    pub port: u16,
    pub threads: usize,
    pub websocket_proxy: Option<String>,
    pub routes: Vec<RouteConfig>,
    pub logging: LoggingConfig,
    pub cache: CacheConfig,
    pub blacklist: BlacklistConfig,
}
Expand description

Represents the parsed and validated configuration.

Fields

address: String

The address to host the server on

port: u16

The port to host the server on

threads: usize

The number of threads to host the server on

websocket_proxy: Option<String>

Address to forward WebSocket connections to

routes: Vec<RouteConfig>

The configuration for different routes

logging: LoggingConfig

Logging configuration

cache: CacheConfig

Cache configuration

blacklist: BlacklistConfig

Blacklist configuration

Implementations

Attempts to load the configuration.

Parses the config from the config tree.

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.