Skip to main content

values

Function values 

Source
fn values<'a, T, P>(
    type_parser: P,
    layer: &str,
) -> impl Parser<Input<'a>, Vec<T>, ErrMode<ParseStack<'a>>>
where P: Parser<Input<'a>, T, ErrMode<ParseStack<'a>>>,
Expand description

Parses a list of values, where each value is in its own line.

The Parser P is used to parse the value of each line.

Repeats until a blank line, the next section header (%...%) or the end of the file. The line ending of the last value is not consumed.

ยงErrors

Returns an error if a value cannot be parsed into T or if the section layout does not match expectations.