pub fn optional_seconds(
config: &HashMap<String, Value>,
field: &str,
node_type: &str,
) -> Result<Option<u64>, String>Expand description
Parses an optional positive duration in seconds.
Absent means “no duration”; 0 is rejected rather than read as “none”,
because the two are too easy to confuse and omitting the field is how you
say it. Pure config parsing with no store dependency, so unlike resolve
this needs no redis-store-gated pair.