Skip to main content

parse

Function parse 

Source
pub fn parse(text: &str) -> Result<SignedDuration, Error>
Expand description

One duration from text, in the grammar both crates speak.

The expansion-time twin of ingraph’s DurationFilter::parse_operand, character for character in what it accepts and in what it answers — see the module note for the pin that keeps it so.

§Errors

jiff’s own refusal, which names the unit it found and where. The wide table makes no message of its own: the caller already holds one that is more specific, and a second would only have to be chosen between. A value the grammar reads but SignedDuration cannot hold — 292471208677y — refuses at the CROSSING instead, since the grammar was fine and the value does not fit is the more useful answer.