var searchIndex = {}; searchIndex["combine"] = {"doc":"This crate contains parser combinators, roughly based on the Haskell library\n[parsec](http://hackage.haskell.org/package/parsec).","items":[[3,"ParseError","combine","Struct which hold information about an error that occured at a specific position.\nCan hold multiple instances of `Error` if more that one error occured in the same position.",null,null],[12,"position","","The position where the error occured",0,null],[12,"errors","","A vector containing specific information on what errors occured at `position`",0,null],[3,"State","","The `State<I>` struct keeps track of the current position in the stream `I`",null,null],[12,"position","","The current position",1,null],[12,"input","","The input stream used when items are requested",1,null],[5,"from_iter","","Converts an `Iterator` into a stream.",null,{"inputs":[{"name":"i"}],"output":{"name":"iteratorstream"}}],[5,"char","","Parses a character and succeeds if the character is equal to `c`",null,{"inputs":[{"name":"char"}],"output":{"name":"token"}}],[5,"digit","","Parses a digit from a stream containing characters",null,{"inputs":[],"output":{"name":"digit"}}],[5,"space","","Parses whitespace",null,{"inputs":[],"output":{"name":"space"}}],[5,"spaces","","Skips over zero or more spaces",null,{"inputs":[],"output":{"name":"spaces"}}],[5,"newline","","Parses a newline character",null,{"inputs":[],"output":{"name":"newline"}}],[5,"crlf","","Parses carriage return and newline, returning the newline character.",null,{"inputs":[],"output":{"name":"crlf"}}],[5,"tab","","Parses a tab character",null,{"inputs":[],"output":{"name":"tab"}}],[5,"upper","","Parses an uppercase letter",null,{"inputs":[],"output":{"name":"upper"}}],[5,"lower","","Parses an lowercase letter",null,{"inputs":[],"output":{"name":"lower"}}],[5,"letter","","Parses an alphabet letter",null,{"inputs":[],"output":{"name":"letter"}}],[5,"alpha_num","","Parses either an alphabet letter or digit",null,{"inputs":[],"output":{"name":"alphanum"}}],[5,"hex_digit","","Parses a hexdecimal digit with uppercase and lowercase",null,{"inputs":[],"output":{"name":"hexdigit"}}],[5,"oct_digit","","Parses an octal digit",null,{"inputs":[],"output":{"name":"octdigit"}}],[5,"string","","Parses the string `s`",null,{"inputs":[{"name":"str"}],"output":{"name":"string"}}],[5,"any","","Parses any token",null,{"inputs":[],"output":{"name":"any"}}],[5,"between","","Parses `open` followed by `parser` followed by `close`\nReturns the value of `parser`",null,{"inputs":[{"name":"l"},{"name":"r"},{"name":"p"}],"output":{"name":"between"}}],[5,"chainl1","","Parses `p` 1 or more times separated by `op`\nThe value returned is the one produced by the left associative application of `op`",null,{"inputs":[{"name":"p"},{"name":"op"}],"output":{"name":"chainl1"}}],[5,"chainr1","","Parses `p` one or more times separated by `op`\nThe value returned is the one produced by the right associative application of `op`",null,{"inputs":[{"name":"p"},{"name":"op"}],"output":{"name":"chainr1"}}],[5,"choice","","Takes an array of parsers and tries to apply them each in order.\nFails if all parsers fails or if an applied parser consumes input before failing.",null,{"inputs":[{"name":"s"}],"output":{"name":"choice"}}],[5,"eof","","Succeeds only if the stream is at end of input, fails otherwise.",null,{"inputs":[],"output":{"name":"eof"}}],[5,"env_parser","","Constructs a parser out of an environment and a function which needs the given environment to\ndo the parsing. This is commonly useful to allow multiple parsers to share some environment\nwhile still allowing the parsers to be written in separate functions.",null,null],[5,"many","","Parses `p` zero or more times returning a collection with the values from `p`.\nIf the returned collection cannot be inferred type annotations must be supplied, either by\nannotating the resulting type binding `let collection: Vec<_> = ...` or by specializing when\ncalling many, `many::<Vec<_>, _>(...)`",null,{"inputs":[{"name":"p"}],"output":{"name":"many"}}],[5,"many1","","Parses `p` one or more times returning a collection with the values from `p`.\nIf the returned collection cannot be inferred type annotations must be supplied, either by\nannotating the resulting type binding `let collection: Vec<_> = ...` or by specializing when\ncalling many1 `many1::<Vec<_>, _>(...)`",null,{"inputs":[{"name":"p"}],"output":{"name":"many1"}}],[5,"optional","","Returns `Some(value)` and `None` on parse failure (always succeeds)",null,{"inputs":[{"name":"p"}],"output":{"name":"optional"}}],[5,"parser","","Wraps a function, turning it into a parser\nMainly needed to turn closures into parsers as function types can be casted to function pointers\nto make them usable as a parser",null,{"inputs":[{"name":"f"}],"output":{"name":"fnparser"}}],[5,"satisfy","","Parses a token and succeeds depending on the result of `predicate`",null,{"inputs":[{"name":"p"}],"output":{"name":"satisfy"}}],[5,"sep_by","","Parses `parser` zero or more time separated by `separator`, returning a collection with the\nvalues from `p`. If the returned collection cannot be inferred type annotations must be\nsupplied, either by annotating the resulting type binding `let collection: Vec<_> = ...` or by\nspecializing when calling sep_by, `sep_by::<Vec<_>, _, _>(...)`",null,{"inputs":[{"name":"p"},{"name":"s"}],"output":{"name":"sepby"}}],[5,"sep_by1","","Parses `parser` one or more time separated by `separator`, returning a collection with the\nvalues from `p`. If the returned collection cannot be inferred type annotations must be\nsupplied, either by annotating the resulting type binding `let collection: Vec<_> = ...` or by\nspecializing when calling sep_by, `sep_by1::<Vec<_>, _, _>(...)`",null,{"inputs":[{"name":"p"},{"name":"s"}],"output":{"name":"sepby1"}}],[5,"sep_end_by","","Parses `parser` zero or more time separated by `separator`, returning a collection with the\nvalues from `p`. If the returned collection cannot be inferred type annotations must be\nsupplied, either by annotating the resulting type binding `let collection: Vec<_> = ...` or by\nspecializing when calling sep_by, `sep_by::<Vec<_>, _, _>(...)`",null,{"inputs":[{"name":"p"},{"name":"s"}],"output":{"name":"sependby"}}],[5,"sep_end_by1","","Parses `parser` one or more time separated by `separator`, returning a collection with the\nvalues from `p`. If the returned collection cannot be inferred type annotations must be\nsupplied, either by annotating the resulting type binding `let collection: Vec<_> = ...` or by\nspecializing when calling sep_by, `sep_by1::<Vec<_>, _, _>(...)`",null,{"inputs":[{"name":"p"},{"name":"s"}],"output":{"name":"sependby1"}}],[5,"skip_many","","Parses `p` zero or more times ignoring the result",null,{"inputs":[{"name":"p"}],"output":{"name":"skipmany"}}],[5,"skip_many1","","Parses `p` one or more times ignoring the result",null,{"inputs":[{"name":"p"}],"output":{"name":"skipmany1"}}],[5,"token","","Parses a character and succeeds if the character is equal to `c`",null,{"inputs":[{"name":"item"}],"output":{"name":"token"}}],[5,"try","","Try acts as `p` except it acts as if the parser hadn't consumed any input\nif `p` returns an error after consuming input",null,{"inputs":[{"name":"p"}],"output":{"name":"try"}}],[5,"look_ahead","","look_ahead acts as p but doesn't consume input on success.",null,{"inputs":[{"name":"p"}],"output":{"name":"lookahead"}}],[5,"value","","Always returns the value `v` without consuming any input.",null,{"inputs":[{"name":"t"}],"output":{"name":"value"}}],[5,"unexpected","","Always fails with `message` as an unexpected error.\nNever consumes any input.",null,{"inputs":[{"name":"s"}],"output":{"name":"unexpected"}}],[5,"not_followed_by","","Succeeds only if `parser` fails.\nNever consumes any input.",null,{"inputs":[{"name":"p"}],"output":{"name":"notfollowedby"}}],[0,"primitives","","Module containing the primitive types which is used to create and compose more advanced parsers",null,null],[3,"SourcePosition","combine::primitives","Struct which represents a position in a source file",null,null],[12,"line","","Current line of the input",2,null],[12,"column","","Current column of the input",2,null],[3,"BytePosition","","Struct which represents a position in a byte stream",null,null],[12,"position","","Current position",3,null],[3,"ParseError","","Struct which hold information about an error that occured at a specific position.\nCan hold multiple instances of `Error` if more that one error occured in the same position.",null,null],[12,"position","","The position where the error occured",0,null],[12,"errors","","A vector containing specific information on what errors occured at `position`",0,null],[3,"State","","The `State<I>` struct keeps track of the current position in the stream `I`",null,null],[12,"position","","The current position",1,null],[12,"input","","The input stream used when items are requested",1,null],[3,"SliceStream","","Newtype for constructing a stream from a slice where the items in the slice are not copyable",null,null],[12,"0","","",4,null],[3,"IteratorStream","","Wrapper around iterators which allows them to be treated as a stream.\nReturned by `from_iter`.",null,null],[4,"Info","","Enum holding error information\nAs there is implementations of `From` for `T: Positioner`, `String` and `&'static str` the\nconstructor need not be used directly as calling `msg.into()` should turn a message into the\ncorrect `Info` variant",null,null],[13,"Token","","",5,null],[13,"Range","","",5,null],[13,"Owned","","",5,null],[13,"Borrowed","","",5,null],[4,"Error","","Enum used to store information about an error that has occured",null,null],[13,"Unexpected","","Error indicating an unexpected token has been encountered in the stream",6,null],[13,"Expected","","Error indicating that the parser expected something else",6,null],[13,"Message","","Generic message",6,null],[13,"Other","","Variant for containing other types of errors",6,null],[4,"Consumed","","Enum used to indicate if a parser consumed any items of the stream it was given as an input",null,null],[13,"Consumed","","Constructor indicating that the parser has consumed elements",7,null],[13,"Empty","","Constructor indicating that the parser did not consume any elements",7,null],[5,"from_iter","","Converts an `Iterator` into a stream.",null,{"inputs":[{"name":"i"}],"output":{"name":"iteratorstream"}}],[6,"ParseResult","","A type alias over the specific `Result` type used by parsers to indicate wether they were\nsuccessful or not.\n`O` is the type that is output on success\n`I` is the specific stream type used in the parser",null,null],[8,"Stream","","A stream is a sequence of items that can be extracted one by one",null,null],[16,"Item","","The type of items which is yielded from this stream",8,null],[16,"Range","","The type of a range of items yielded from this stream.\nTypes which do not a have a way of yielding ranges of items should just use the\nSelf::Item for this type",8,null],[10,"uncons","","Takes a stream and removes its first item, yielding the item and the rest of the elements\nReturns `Err` if no element could be retrieved",8,null],[8,"RangeStream","","A `RangeStream` is an extension of Stream which allows for zero copy parsing",null,null],[10,"uncons_range","","Takes `size` elements from the stream\nFails if the length of the stream is less than `size`.",9,null],[10,"uncons_while","","Takes items from stream, testing each one with `predicate`\nreturns the range of items which passed `predicate`",9,null],[8,"Range","","",null,null],[10,"len","","Returns the remaining length of `self`.\nThe returned length need not be the same as the number of items left in the stream",10,null],[8,"Positioner","","Trait for updating the position for types which can be yielded from a `Stream`.",null,null],[16,"Position","","The type which keeps track of the position.",11,null],[10,"start","","Creates a start position",11,{"inputs":[],"output":{"name":"position"}}],[10,"update","","Updates the position given that `self` has been taken from the stream",11,null],[8,"Parser","","By implementing the `Parser` trait a type says that it can be used to parse an input stream into\nthe type `Output`.",null,null],[16,"Input","","The type which is take as input for the parser. The type must implement the `Stream` trait\nwhich allows the parser to read item from the type.",12,null],[16,"Output","","The type which is returned if the parser is successful.",12,null],[11,"parse","","Entrypoint of the parser\nTakes some input and tries to parse it returning a `ParseResult`",12,null],[11,"parse_state","","Parses using the state `input` by calling Stream::uncons one or more times\nOn success returns `Ok((value, new_state))` on failure it returns `Err(error)`",12,null],[11,"parse_lazy","","Specialized version of parse_state where the parser does not need to add an error to the\n`ParseError` when it does not consume any input before encountering the error.\nInstead the error can be added later through the `add_error` method",12,null],[11,"add_error","","Adds the first error that would normally be returned by this parser if it failed",12,null],[11,"partial_cmp","","",2,null],[11,"lt","","",2,null],[11,"le","","",2,null],[11,"gt","","",2,null],[11,"ge","","",2,null],[11,"cmp","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"partial_cmp","","",3,null],[11,"lt","","",3,null],[11,"le","","",3,null],[11,"gt","","",3,null],[11,"ge","","",3,null],[11,"cmp","","",3,null],[11,"eq","","",3,null],[11,"ne","","",3,null],[11,"fmt","","",3,null],[11,"clone","","",3,null],[11,"fmt","","",3,null],[11,"fmt","","",5,null],[11,"clone","","",5,null],[11,"eq","","",5,null],[11,"fmt","","",5,null],[11,"from","","",5,{"inputs":[{"name":"char"}],"output":{"name":"info"}}],[11,"from","","",5,{"inputs":[{"name":"string"}],"output":{"name":"info"}}],[11,"from","","",5,{"inputs":[{"name":"str"}],"output":{"name":"info"}}],[11,"fmt","","",6,null],[11,"eq","","",6,null],[11,"from","","",6,{"inputs":[{"name":"e"}],"output":{"name":"error"}}],[11,"end_of_input","","",6,{"inputs":[],"output":{"name":"error"}}],[11,"fmt","","",7,null],[11,"eq","","",7,null],[11,"ne","","",7,null],[11,"clone","","",7,null],[11,"is_empty","","Returns true if `self` is empty",7,null],[11,"into_inner","","Extracts the contained value",7,null],[11,"as_consumed","","Converts `self` into the Consumed state",7,null],[11,"as_empty","","Converts `self` into theEmpty state",7,null],[11,"map","","Maps over the contained value without changing the consumed state",7,null],[11,"merge","","",7,null],[11,"combine","","Combines the Consumed flags from `self` and the result of `f`",7,null],[11,"new","","",0,{"inputs":[{"name":"position"},{"name":"error"}],"output":{"name":"parseerror"}}],[11,"empty","","",0,{"inputs":[{"name":"position"}],"output":{"name":"parseerror"}}],[11,"from_errors","","",0,{"inputs":[{"name":"position"},{"name":"vec"}],"output":{"name":"parseerror"}}],[11,"end_of_input","","",0,{"inputs":[{"name":"position"}],"output":{"name":"parseerror"}}],[11,"add_message","","",0,null],[11,"add_error","","",0,null],[11,"set_expected","","",0,null],[11,"merge","","",0,null],[11,"description","","",0,null],[11,"eq","","",0,null],[11,"fmt","","",0,null],[11,"fmt","","",0,null],[11,"fmt","","",2,null],[11,"fmt","","",6,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"new","","Creates a new `State<I>` from an input stream. Initializes the position to\n`Positioner::start()`",1,{"inputs":[{"name":"i"}],"output":{"name":"state"}}],[11,"uncons","","`uncons` is the most general way of extracting and item from a stream\nIt takes a function `f` as argument which should update the position\naccording to the item that was extracted\nUsually you want to use `uncons_char` instead which works directly on character streams",1,null],[11,"update","","Updates the `position` and `input` to be as if `item` was removed and `rest` is\nthe remaining input",1,null],[11,"uncons_range","","Removes `size` items from the input returning them as a range.\nFails if there are fewer items than `size`",1,null],[11,"uncons_while","","Removes items from the input while `predicate` returns `true`.",1,null],[11,"fmt","","",4,null],[11,"partial_cmp","","",4,null],[11,"lt","","",4,null],[11,"le","","",4,null],[11,"gt","","",4,null],[11,"ge","","",4,null],[11,"cmp","","",4,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"clone","","",4,null],[11,"uncons","","",4,null],[11,"uncons_range","","",4,null],[11,"uncons_while","","",4,null],[11,"fmt","","",13,null],[11,"clone","","",13,null],[11,"uncons","","",13,null],[11,"start","","",4,{"inputs":[],"output":{"name":"position"}}],[11,"update","","",4,null],[0,"combinator","combine","Module containing all specific parsers",null,null],[3,"Any","combine::combinator","",null,null],[3,"Satisfy","","",null,null],[3,"Token","","",null,null],[3,"Choice","","",null,null],[3,"Unexpected","","",null,null],[3,"Value","","",null,null],[3,"NotFollowedBy","","",null,null],[3,"Eof","","",null,null],[3,"Iter","","",null,null],[3,"Many","","",null,null],[3,"Many1","","",null,null],[3,"SkipMany","","",null,null],[3,"SkipMany1","","",null,null],[3,"SepBy","","",null,null],[3,"SepBy1","","",null,null],[3,"SepEndBy","","",null,null],[3,"SepEndBy1","","",null,null],[3,"FnParser","","",null,null],[3,"Optional","","",null,null],[3,"Between","","",null,null],[3,"Chainl1","","",null,null],[3,"Chainr1","","",null,null],[3,"Try","","",null,null],[3,"LookAhead","","",null,null],[3,"And","","",null,null],[3,"With","","",null,null],[3,"Skip","","",null,null],[3,"Message","","",null,null],[3,"Or","","",null,null],[3,"Map","","",null,null],[3,"Then","","",null,null],[3,"Expected","","",null,null],[3,"AndThen","","",null,null],[3,"EnvParser","","",null,null],[3,"Range","","",null,null],[3,"Take","","",null,null],[3,"TakeWhile","","",null,null],[3,"TakeWhile1","","",null,null],[5,"any","","Parses any token",null,{"inputs":[],"output":{"name":"any"}}],[5,"satisfy","","Parses a token and succeeds depending on the result of `predicate`",null,{"inputs":[{"name":"p"}],"output":{"name":"satisfy"}}],[5,"token","","Parses a character and succeeds if the character is equal to `c`",null,{"inputs":[{"name":"item"}],"output":{"name":"token"}}],[5,"choice","","Takes an array of parsers and tries to apply them each in order.\nFails if all parsers fails or if an applied parser consumes input before failing.",null,{"inputs":[{"name":"s"}],"output":{"name":"choice"}}],[5,"unexpected","","Always fails with `message` as an unexpected error.\nNever consumes any input.",null,{"inputs":[{"name":"s"}],"output":{"name":"unexpected"}}],[5,"value","","Always returns the value `v` without consuming any input.",null,{"inputs":[{"name":"t"}],"output":{"name":"value"}}],[5,"not_followed_by","","Succeeds only if `parser` fails.\nNever consumes any input.",null,{"inputs":[{"name":"p"}],"output":{"name":"notfollowedby"}}],[5,"eof","","Succeeds only if the stream is at end of input, fails otherwise.",null,{"inputs":[],"output":{"name":"eof"}}],[5,"many","","Parses `p` zero or more times returning a collection with the values from `p`.\nIf the returned collection cannot be inferred type annotations must be supplied, either by\nannotating the resulting type binding `let collection: Vec<_> = ...` or by specializing when\ncalling many, `many::<Vec<_>, _>(...)`",null,{"inputs":[{"name":"p"}],"output":{"name":"many"}}],[5,"skip_many","","Parses `p` zero or more times ignoring the result",null,{"inputs":[{"name":"p"}],"output":{"name":"skipmany"}}],[5,"skip_many1","","Parses `p` one or more times ignoring the result",null,{"inputs":[{"name":"p"}],"output":{"name":"skipmany1"}}],[5,"many1","","Parses `p` one or more times returning a collection with the values from `p`.\nIf the returned collection cannot be inferred type annotations must be supplied, either by\nannotating the resulting type binding `let collection: Vec<_> = ...` or by specializing when\ncalling many1 `many1::<Vec<_>, _>(...)`",null,{"inputs":[{"name":"p"}],"output":{"name":"many1"}}],[5,"sep_by","","Parses `parser` zero or more time separated by `separator`, returning a collection with the\nvalues from `p`. If the returned collection cannot be inferred type annotations must be\nsupplied, either by annotating the resulting type binding `let collection: Vec<_> = ...` or by\nspecializing when calling sep_by, `sep_by::<Vec<_>, _, _>(...)`",null,{"inputs":[{"name":"p"},{"name":"s"}],"output":{"name":"sepby"}}],[5,"sep_by1","","Parses `parser` one or more time separated by `separator`, returning a collection with the\nvalues from `p`. If the returned collection cannot be inferred type annotations must be\nsupplied, either by annotating the resulting type binding `let collection: Vec<_> = ...` or by\nspecializing when calling sep_by, `sep_by1::<Vec<_>, _, _>(...)`",null,{"inputs":[{"name":"p"},{"name":"s"}],"output":{"name":"sepby1"}}],[5,"sep_end_by","","Parses `parser` zero or more time separated by `separator`, returning a collection with the\nvalues from `p`. If the returned collection cannot be inferred type annotations must be\nsupplied, either by annotating the resulting type binding `let collection: Vec<_> = ...` or by\nspecializing when calling sep_by, `sep_by::<Vec<_>, _, _>(...)`",null,{"inputs":[{"name":"p"},{"name":"s"}],"output":{"name":"sependby"}}],[5,"sep_end_by1","","Parses `parser` one or more time separated by `separator`, returning a collection with the\nvalues from `p`. If the returned collection cannot be inferred type annotations must be\nsupplied, either by annotating the resulting type binding `let collection: Vec<_> = ...` or by\nspecializing when calling sep_by, `sep_by1::<Vec<_>, _, _>(...)`",null,{"inputs":[{"name":"p"},{"name":"s"}],"output":{"name":"sependby1"}}],[5,"parser","","Wraps a function, turning it into a parser\nMainly needed to turn closures into parsers as function types can be casted to function pointers\nto make them usable as a parser",null,{"inputs":[{"name":"f"}],"output":{"name":"fnparser"}}],[5,"optional","","Returns `Some(value)` and `None` on parse failure (always succeeds)",null,{"inputs":[{"name":"p"}],"output":{"name":"optional"}}],[5,"between","","Parses `open` followed by `parser` followed by `close`\nReturns the value of `parser`",null,{"inputs":[{"name":"l"},{"name":"r"},{"name":"p"}],"output":{"name":"between"}}],[5,"chainl1","","Parses `p` 1 or more times separated by `op`\nThe value returned is the one produced by the left associative application of `op`",null,{"inputs":[{"name":"p"},{"name":"op"}],"output":{"name":"chainl1"}}],[5,"chainr1","","Parses `p` one or more times separated by `op`\nThe value returned is the one produced by the right associative application of `op`",null,{"inputs":[{"name":"p"},{"name":"op"}],"output":{"name":"chainr1"}}],[5,"try","","Try acts as `p` except it acts as if the parser hadn't consumed any input\nif `p` returns an error after consuming input",null,{"inputs":[{"name":"p"}],"output":{"name":"try"}}],[5,"look_ahead","","look_ahead acts as p but doesn't consume input on success.",null,{"inputs":[{"name":"p"}],"output":{"name":"lookahead"}}],[5,"env_parser","","Constructs a parser out of an environment and a function which needs the given environment to\ndo the parsing. This is commonly useful to allow multiple parsers to share some environment\nwhile still allowing the parsers to be written in separate functions.",null,null],[5,"range","","```\n# extern crate combine as pc;\n# use pc::combinator::range;\n# use pc::*;\n# fn main() {\nlet mut parser = range("hello");\nlet result = parser.parse("hello world");\nassert_eq!(result, Ok(("hello", " world")));\nlet result = parser.parse("hel world");\nassert!(result.is_err());\n# }\n```",null,{"inputs":[{"name":"range"}],"output":{"name":"range"}}],[5,"take","","```\n# extern crate combine as pc;\n# use pc::combinator::take;\n# use pc::*;\n# fn main() {\nlet mut parser = take(4);\nlet result = parser.parse("123abc");\nassert_eq!(result, Ok(("123a", "bc")));\nlet result = parser.parse("abc");\nassert!(result.is_err());\n# }\n```",null,{"inputs":[{"name":"usize"}],"output":{"name":"take"}}],[5,"take_while","","```\n# extern crate combine as pc;\n# use pc::combinator::take_while;\n# use pc::*;\n# fn main() {\nlet mut parser = take_while(|c: char| c.is_digit(10));\nlet result = parser.parse("123abc");\nassert_eq!(result, Ok(("123", "abc")));\nlet result = parser.parse("abc");\nassert_eq!(result, Ok(("", "abc")));\n# }\n```",null,{"inputs":[{"name":"f"}],"output":{"name":"takewhile"}}],[5,"take_while1","","```\n# extern crate combine as pc;\n# use pc::combinator::take_while1;\n# use pc::*;\n# fn main() {\nlet mut parser = take_while1(|c: char| c.is_digit(10));\nlet result = parser.parse("123abc");\nassert_eq!(result, Ok(("123", "abc")));\nlet result = parser.parse("abc");\nassert!(result.is_err());\n# }\n```",null,{"inputs":[{"name":"f"}],"output":{"name":"takewhile1"}}],[8,"ParserExt","","Extension trait which provides functions that are more conveniently used through method calls",null,null],[11,"with","","Discards the value of the `self` parser and returns the value of `p`\nFails if any of the parsers fails",14,null],[11,"skip","","Discards the value of the `p` parser and returns the value of `self`\nFails if any of the parsers fails",14,null],[11,"and","","Parses with `self` followed by `p`\nSucceeds if both parsers succeed, otherwise fails\nReturns a tuple with both values on success",14,null],[11,"or","","Returns a parser which attempts to parse using `self`. If `self` fails without consuming any\ninput it tries to consume the same input using `p`.",14,null],[11,"then","","Parses using `self` and then passes the value to `f` which returns a parser used to parse\nthe rest of the input",14,null],[11,"map","","Uses `f` to map over the parsed value",14,null],[11,"message","","Parses with `self` and if it fails, adds the message `msg` to the error",14,null],[11,"expected","","Parses with `self` and if it fails without consuming any input any expected errors are\nreplaced by `msg`. `msg` is then used in error messages as "Expected `msg`".",14,null],[11,"and_then","","Parses with `self` and applies `f` on the result if `self` parses successfully\n`f` may optionally fail with an error which is automatically converted to a `ParseError`",14,null],[11,"iter","","Creates an iterator from a parser and a state. Can be used as an alternative to `many` when\ncollecting directly into a `FromIterator` type is not desirable",14,null],[11,"clone","","",15,null],[11,"parse_lazy","","",15,null],[11,"clone","","",16,null],[11,"parse_lazy","","",16,null],[11,"clone","","",17,null],[11,"parse_lazy","","",17,null],[11,"add_error","","",17,null],[11,"clone","","",18,null],[11,"parse_lazy","","",18,null],[11,"add_error","","",18,null],[11,"clone","","",19,null],[11,"parse_lazy","","",19,null],[11,"add_error","","",19,null],[11,"clone","","",20,null],[11,"parse_lazy","","",20,null],[11,"clone","","",21,null],[11,"parse_state","","",21,null],[11,"parse_lazy","","",21,null],[11,"add_error","","",21,null],[11,"clone","","",22,null],[11,"parse_lazy","","",22,null],[11,"add_error","","",22,null],[11,"into_result","","Converts the iterator to a `ParseResult`, returning `Ok` if the parsing so far has be done\nwithout any errors which consumed data.",23,null],[11,"next","","",23,null],[11,"clone","","",24,null],[11,"parse_state","","",24,null],[11,"clone","","",25,null],[11,"parse_lazy","","",25,null],[11,"add_error","","",25,null],[11,"clone","","",26,null],[11,"parse_state","","",26,null],[11,"parse_lazy","","",26,null],[11,"add_error","","",26,null],[11,"clone","","",27,null],[11,"parse_state","","",27,null],[11,"parse_lazy","","",27,null],[11,"add_error","","",27,null],[11,"clone","","",28,null],[11,"parse_lazy","","",28,null],[11,"add_error","","",28,null],[11,"clone","","",29,null],[11,"parse_lazy","","",29,null],[11,"add_error","","",29,null],[11,"clone","","",30,null],[11,"parse_lazy","","",30,null],[11,"add_error","","",30,null],[11,"clone","","",31,null],[11,"parse_lazy","","",31,null],[11,"add_error","","",31,null],[11,"clone","","",32,null],[11,"parse_state","","",32,null],[11,"clone","","",33,null],[11,"parse_lazy","","",33,null],[11,"clone","","",34,null],[11,"parse_state","","",34,null],[11,"parse_lazy","","",34,null],[11,"add_error","","",34,null],[11,"clone","","",35,null],[11,"parse_lazy","","",35,null],[11,"add_error","","",35,null],[11,"clone","","",36,null],[11,"parse_lazy","","",36,null],[11,"add_error","","",36,null],[11,"clone","","",37,null],[11,"parse_lazy","","",37,null],[11,"add_error","","",37,null],[11,"clone","","",38,null],[11,"parse_lazy","","",38,null],[11,"add_error","","",38,null],[11,"clone","","",39,null],[11,"parse_lazy","","",39,null],[11,"add_error","","",39,null],[11,"clone","","",40,null],[11,"parse_lazy","","",40,null],[11,"add_error","","",40,null],[11,"clone","","",41,null],[11,"parse_lazy","","",41,null],[11,"add_error","","",41,null],[11,"clone","","",42,null],[11,"parse_state","","",42,null],[11,"parse_lazy","","",42,null],[11,"add_error","","",42,null],[11,"clone","","",43,null],[11,"parse_lazy","","",43,null],[11,"add_error","","",43,null],[11,"clone","","",44,null],[11,"parse_lazy","","",44,null],[11,"add_error","","",44,null],[11,"clone","","",45,null],[11,"parse_lazy","","",45,null],[11,"add_error","","",45,null],[11,"clone","","",46,null],[11,"parse_state","","",46,null],[11,"parse_lazy","","",46,null],[11,"add_error","","",46,null],[11,"clone","","",47,null],[11,"parse_lazy","","",47,null],[11,"add_error","","",47,null],[11,"clone","","",48,null],[11,"parse_lazy","","",48,null],[11,"parse_lazy","","",49,null],[11,"add_error","","",49,null],[11,"parse_lazy","","",50,null],[11,"parse_lazy","","",51,null],[11,"parse_lazy","","",52,null],[0,"char","combine","Module containg parsers specialized on character streams",null,null],[3,"Digit","combine::char","",null,null],[3,"Space","","",null,null],[3,"Spaces","","",null,null],[3,"NewLine","","",null,null],[3,"CrLf","","",null,null],[3,"Tab","","",null,null],[3,"Upper","","",null,null],[3,"Lower","","",null,null],[3,"AlphaNum","","",null,null],[3,"Letter","","",null,null],[3,"OctDigit","","",null,null],[3,"HexDigit","","",null,null],[3,"String","","",null,null],[5,"char","","Parses a character and succeeds if the character is equal to `c`",null,{"inputs":[{"name":"char"}],"output":{"name":"token"}}],[5,"digit","","Parses a digit from a stream containing characters",null,{"inputs":[],"output":{"name":"digit"}}],[5,"space","","Parses whitespace",null,{"inputs":[],"output":{"name":"space"}}],[5,"spaces","","Skips over zero or more spaces",null,{"inputs":[],"output":{"name":"spaces"}}],[5,"newline","","Parses a newline character",null,{"inputs":[],"output":{"name":"newline"}}],[5,"crlf","","Parses carriage return and newline, returning the newline character.",null,{"inputs":[],"output":{"name":"crlf"}}],[5,"tab","","Parses a tab character",null,{"inputs":[],"output":{"name":"tab"}}],[5,"upper","","Parses an uppercase letter",null,{"inputs":[],"output":{"name":"upper"}}],[5,"lower","","Parses an lowercase letter",null,{"inputs":[],"output":{"name":"lower"}}],[5,"alpha_num","","Parses either an alphabet letter or digit",null,{"inputs":[],"output":{"name":"alphanum"}}],[5,"letter","","Parses an alphabet letter",null,{"inputs":[],"output":{"name":"letter"}}],[5,"oct_digit","","Parses an octal digit",null,{"inputs":[],"output":{"name":"octdigit"}}],[5,"hex_digit","","Parses a hexdecimal digit with uppercase and lowercase",null,{"inputs":[],"output":{"name":"hexdigit"}}],[5,"string","","Parses the string `s`",null,{"inputs":[{"name":"str"}],"output":{"name":"string"}}],[11,"clone","","",53,null],[11,"parse_lazy","","",53,null],[11,"add_error","","",53,null],[11,"clone","","",54,null],[11,"parse_lazy","","",54,null],[11,"add_error","","",54,null],[11,"clone","","",55,null],[11,"parse_lazy","","",55,null],[11,"add_error","","",55,null],[11,"clone","","",56,null],[11,"parse_lazy","","",56,null],[11,"add_error","","",56,null],[11,"clone","","",57,null],[11,"parse_lazy","","",57,null],[11,"add_error","","",57,null],[11,"clone","","",58,null],[11,"parse_lazy","","",58,null],[11,"add_error","","",58,null],[11,"clone","","",59,null],[11,"parse_lazy","","",59,null],[11,"add_error","","",59,null],[11,"clone","","",60,null],[11,"parse_lazy","","",60,null],[11,"add_error","","",60,null],[11,"clone","","",61,null],[11,"parse_lazy","","",61,null],[11,"add_error","","",61,null],[11,"clone","","",62,null],[11,"parse_lazy","","",62,null],[11,"add_error","","",62,null],[11,"clone","","",63,null],[11,"parse_lazy","","",63,null],[11,"add_error","","",63,null],[11,"clone","","",64,null],[11,"parse_lazy","","",64,null],[11,"add_error","","",64,null],[11,"clone","","",65,null],[11,"parse_lazy","","",65,null],[11,"add_error","","",65,null],[6,"ParseResult","combine","A type alias over the specific `Result` type used by parsers to indicate wether they were\nsuccessful or not.\n`O` is the type that is output on success\n`I` is the specific stream type used in the parser",null,null],[8,"Parser","","By implementing the `Parser` trait a type says that it can be used to parse an input stream into\nthe type `Output`.",null,null],[16,"Input","","The type which is take as input for the parser. The type must implement the `Stream` trait\nwhich allows the parser to read item from the type.",12,null],[16,"Output","","The type which is returned if the parser is successful.",12,null],[11,"parse","","Entrypoint of the parser\nTakes some input and tries to parse it returning a `ParseResult`",12,null],[11,"parse_state","","Parses using the state `input` by calling Stream::uncons one or more times\nOn success returns `Ok((value, new_state))` on failure it returns `Err(error)`",12,null],[11,"parse_lazy","","Specialized version of parse_state where the parser does not need to add an error to the\n`ParseError` when it does not consume any input before encountering the error.\nInstead the error can be added later through the `add_error` method",12,null],[11,"add_error","","Adds the first error that would normally be returned by this parser if it failed",12,null],[8,"ParserExt","","Extension trait which provides functions that are more conveniently used through method calls",null,null],[11,"with","","Discards the value of the `self` parser and returns the value of `p`\nFails if any of the parsers fails",14,null],[11,"skip","","Discards the value of the `p` parser and returns the value of `self`\nFails if any of the parsers fails",14,null],[11,"and","","Parses with `self` followed by `p`\nSucceeds if both parsers succeed, otherwise fails\nReturns a tuple with both values on success",14,null],[11,"or","","Returns a parser which attempts to parse using `self`. If `self` fails without consuming any\ninput it tries to consume the same input using `p`.",14,null],[11,"then","","Parses using `self` and then passes the value to `f` which returns a parser used to parse\nthe rest of the input",14,null],[11,"map","","Uses `f` to map over the parsed value",14,null],[11,"message","","Parses with `self` and if it fails, adds the message `msg` to the error",14,null],[11,"expected","","Parses with `self` and if it fails without consuming any input any expected errors are\nreplaced by `msg`. `msg` is then used in error messages as "Expected `msg`".",14,null],[11,"and_then","","Parses with `self` and applies `f` on the result if `self` parses successfully\n`f` may optionally fail with an error which is automatically converted to a `ParseError`",14,null],[11,"iter","","Creates an iterator from a parser and a state. Can be used as an alternative to `many` when\ncollecting directly into a `FromIterator` type is not desirable",14,null]],"paths":[[3,"ParseError"],[3,"State"],[3,"SourcePosition"],[3,"BytePosition"],[3,"SliceStream"],[4,"Info"],[4,"Error"],[4,"Consumed"],[8,"Stream"],[8,"RangeStream"],[8,"Range"],[8,"Positioner"],[8,"Parser"],[3,"IteratorStream"],[8,"ParserExt"],[3,"Any"],[3,"Satisfy"],[3,"Token"],[3,"Choice"],[3,"Unexpected"],[3,"Value"],[3,"NotFollowedBy"],[3,"Eof"],[3,"Iter"],[3,"Many"],[3,"Many1"],[3,"SkipMany"],[3,"SkipMany1"],[3,"SepBy"],[3,"SepBy1"],[3,"SepEndBy"],[3,"SepEndBy1"],[3,"FnParser"],[3,"Optional"],[3,"Between"],[3,"Chainl1"],[3,"Chainr1"],[3,"Try"],[3,"LookAhead"],[3,"And"],[3,"With"],[3,"Skip"],[3,"Message"],[3,"Or"],[3,"Map"],[3,"Then"],[3,"Expected"],[3,"AndThen"],[3,"EnvParser"],[3,"Range"],[3,"Take"],[3,"TakeWhile"],[3,"TakeWhile1"],[3,"Digit"],[3,"Space"],[3,"Spaces"],[3,"NewLine"],[3,"CrLf"],[3,"Tab"],[3,"Upper"],[3,"Lower"],[3,"AlphaNum"],[3,"Letter"],[3,"OctDigit"],[3,"HexDigit"],[3,"String"]]}; initSearch(searchIndex);