Struct ssw::websrv::WebsrvConfig
source · [−]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
root_folder: String
Where the website is stored
Implementations
sourceimpl WebsrvConfig
impl WebsrvConfig
Holds the configuration for the Web server.
sourcepub fn from_file(filename: &str) -> WebsrvConfig
pub fn from_file(filename: &str) -> WebsrvConfig
Loads the config from a config file
No need to put the file extension (eg. .toml)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for WebsrvConfig
impl Send for WebsrvConfig
impl Sync for WebsrvConfig
impl Unpin for WebsrvConfig
impl UnwindSafe for WebsrvConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more