Skip to main content

parse_duration_sec

Function parse_duration_sec 

Source
pub fn parse_duration_sec(s: &str) -> Result<i32, XmlError>
Expand description

Seconds value for Duration_t.sec per Spec §7.2.2 + the nonNegativeInteger_Duration_SEC pattern.

Accepts:

  • Decimal 0..=0x7FFFFFFF.
  • Symbols DURATION_INFINITY and DURATION_INFINITE_SEC -> sentinel DURATION_INFINITE_SEC.

§Errors

XmlError::ValueOutOfRange on negative values or overflow.