Skip to main content

load_from_file

Function load_from_file 

Source
pub fn load_from_file(
    path: impl AsRef<Path>,
) -> Result<ServerConfig, ServerError>
Expand description

Loads a server configuration from a TOML file.

ยงErrors

Returns ServerError::ConfigLoad when the file cannot be read, the TOML is malformed, or strict deserialization rejects an unknown field.