Module parsers

Module parsers 

Source
Expand description

This module exposes parsers that accept further configuration with builder pattern

In most cases you won’t be using those names directly, they’re only listed here to provide access to documentation

Structs§

NamedArg
A named thing used to create flag, switch or argument
ParseAny
Consume an arbitrary value that satisfies a condition, created with any, implements anywhere.
ParseArgument
Parser for a named argument, created with argument.
ParseCollect
Apply inner parser several times and collect results into FromIterator, created with collect, Implements catch
ParseCommand
Builder structure for the [command]
ParseCon
Create parser from a function, construct! uses it internally
ParseCount
Apply inner parser as many times as it succeeds while consuming something and return this number
ParseFallback
Parser that substitutes missing value but not parse failure, created with fallback.
ParseFallbackWith
Parser that substitutes missing value with a function results but not parser failure, created with fallback_with.
ParseFlag
Parser for a named switch, created with NamedArg::flag or NamedArg::switch
ParseLast
Apply inner parser as many times as it succeeds while consuming something and return this number
ParseMany
Apply inner parser several times and collect results into Vec, created with many, implements catch.
ParseOptional
Apply inner parser, return a value in Some if items requested by it are all present, restore and return None if any are missing. Created with optional. Implements catch
ParsePositional
Parse a positional item, created with positional
ParseSome
Apply inner parser several times and collect results into Vec, created with some, requires for at least one item to be available to succeed. Implements catch