pub struct WebsrvConfig {
    pub nbr_of_threads: usize,
    pub bind_addr: String,
    pub root_folder: String,
}

Fields

nbr_of_threads: usize

How many threads to use in our threadPool. Will panic if < 0

bind_addr: String

Bind address such as :, eg. 0.0.0.0:7878 0.0.0.0 means we listen to any incoming connection

root_folder: String

Where the website is stored

Implementations

Holds the configuration for the Web server.

Loads the config from a config file

No need to put the file extension (eg. .toml)

Trait Implementations

Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

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.