Skip to main content

parse_ttl

Function parse_ttl 

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

Parse TTL header value

Validates that the TTL is a valid unsigned integer with no leading zeros, no decimal points, and no scientific notation.

ยงErrors

Returns Error::InvalidTtl if the value has leading zeros, decimals, scientific notation, is negative, or is not a valid integer.