Skip to main content

parse_limit

Function parse_limit 

Source
pub fn parse_limit(value: &str) -> Result<u64, String>
Expand description

Parse an integer token budget or a decimal-k budget: 500, 10k, 1.5K. k means 1000. Fractional tokens, negatives, whitespace, and overflow fail.