Module container

Module container 

Source
Expand description

This module provides parsers for types that contain possibly multiple values. This includes stdlib types like Option, Vec, Box, Rc, RefCell and types for delimited and repeated values with numbered repeats.

Structs§

DelimitedVec
Since the delimiter in Delimited<T,D> is optional a Vec<Delimited<T,D>> would parse consecutive values even without delimiters. DelimitedVec<T,D> will stop parsing after the first value without a delimiter.
LazyVec
A Vec<T> that is filled up to the first appearance of an terminating S. This S may be a subset of T, thus parsing become lazy. This is the same as Cons<Vec<Cons<Except<S>,T>>,S> but more convenient and efficient.
Repeats
Like DelimitedVec<T,D> but with a minimum and maximum (inclusive) number of elements. Parsing will succeed when at least the minimum number of elements is reached and stop at the maximum number. The delimiter D defaults to Nothing to parse sequences which don’t have delimiters.

Traits§

RangedRepeats
A trait for parsing a repeating T with a minimum and maximum limit. Sometimes the number of elements to be parsed is determined at runtime eg. a number of header items needs a matching number of values.

Type Aliases§

Any
Any number of T delimited by D or Nothing
AtLeast
At least N of T delimited by D or Nothing
AtMost
At most N of T delimited by D or Nothing
ColonDelimitedVec
Vector of T delimited by :
CommaDelimitedVec
Vector of T delimited by ,
DotDelimitedVec
Vector of T delimited by .
Exactly
Exactly N of T delimited by D or Nothing
Many
One or more of T delimited by D or Nothing
Optional
Zero or one of T delimited by D or Nothing
PathSepDelimitedVec
Vector of T delimited by ::
SemicolonDelimitedVec
Vector of T delimited by ;