Skip to main content

limits_from_toml_path

Function limits_from_toml_path 

pub fn limits_from_toml_path(path: &str) -> Result<BrokerLimits, ConfigError>
Expand description

Reads the [alor] section of a limits file on disk, to tune the limits without recompiling.

§Errors

[brokapi_core::ConfigError::Message] when the file cannot be read (the message names the path), and for every reason limits_from_toml_str lists.

§Examples

use brokapi_alor::limits::limits_from_toml_path;

let err = limits_from_toml_path("/definitely/not/here.toml").unwrap_err();
assert!(err.to_string().contains("/definitely/not/here.toml"));