pub fn parse_limits(raw: &str) -> Result<BrokerLimits, Error>Expand description
Parses the [finam] section of a limits file through BrokerLimits::from_toml_section.
Use it to load your own limits, for example when the broker raises its quota.
§Errors
[Error::Config] when the text is not valid TOML or has no [finam] section. A section of
another broker is not accepted.
§Examples
use brokapi_finam::limits::{DEFAULT_LIMITS_TOML, parse_limits};
assert!(parse_limits(DEFAULT_LIMITS_TOML).is_ok());
assert!(parse_limits("[bcs.buckets.global]\nrate = 1").is_err());