var searchIndex = {}; searchIndex["chomp"] = {"doc":"Chomp is a fast monadic-style parser combinator library for the Rust programming language. It was\nwritten as the culmination of the experiments detailed in these blog posts:","items":[[3,"Input","chomp","Linear type containing the parser state, this type is threaded though `bind` and is also the\ninitial type passed to a parser.",null,null],[3,"ParseResult","","The basic return type of a parser.",null,null],[4,"ParseError","","Simple error type returned from `parse_only`.",null,null],[13,"Error","","",0,null],[13,"Incomplete","","",0,null],[5,"parse_only","","Runs the given parser on the supplied finite input.",null,null],[11,"hash","","",1,null],[11,"partial_cmp","","",1,null],[11,"lt","","",1,null],[11,"le","","",1,null],[11,"gt","","",1,null],[11,"ge","","",1,null],[11,"cmp","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"fmt","","",1,null],[11,"new","","Creates a new `Input` to start parsing with.",1,null],[11,"ret","","Returns `t` as a success value in the parsing context.",1,null],[11,"err","","Returns `e` as an error value in the parsing context.",1,null],[11,"incomplete","","Notifies that a parser has reached the end of the currently supplied slice but requires\nmore data.",1,null],[11,"from_result","","Converts a `Result` into a `ParseResult`, preserving parser state.",1,null],[11,"clone","","",1,null],[11,"buffer","","",1,null],[11,"replace","","",1,null],[11,"is_last_slice","","",1,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"fmt","","",0,null],[11,"hash","","",2,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,"bind","","Sequentially composes the result with a parse action ``f``, passing any produced value as\nthe second parameter.",2,null],[11,"then","","Sequentially composes the result with a parse action ``f``, discarding any produced value.",2,null],[11,"map","","Applies the function `f` on the contained data if the parser is in a success state.",2,null],[11,"map_err","","Applies the function `f` on the contained error if the parser is in an error state.",2,null],[11,"inspect","","Calls the function `f` with a reference of the contained data if the parser is in a success\nstate.",2,null],[11,"unwrap","","Unwraps a parse result, yielding the content of the success-state.",2,null],[11,"expect","","Unwraps a parse result, yielding the contents of the success state.",2,null],[11,"unwrap_err","","Unwraps a parse result, yielding the contents of the error state.",2,null],[11,"into_inner","","",2,null],[0,"ascii","","Utilities and parsers for dealing with ASCII data in `u8` format.",null,null],[5,"is_lowercase","chomp::ascii","Lowercase ASCII predicate.",null,{"inputs":[{"name":"u8"}],"output":{"name":"bool"}}],[5,"is_uppercase","","Uppercase ASCII character predicate.",null,{"inputs":[{"name":"u8"}],"output":{"name":"bool"}}],[5,"is_whitespace","","ASCII whitespace predicate.",null,{"inputs":[{"name":"u8"}],"output":{"name":"bool"}}],[5,"is_horizontal_space","","A predicate which matches either space (' ') or horizontal tab ('\\t').",null,{"inputs":[{"name":"u8"}],"output":{"name":"bool"}}],[5,"is_end_of_line","","A predicate matching eithr a newline ('\\n') or a carriage return ('\\r').",null,{"inputs":[{"name":"u8"}],"output":{"name":"bool"}}],[5,"is_digit","","ASCII digit predicate.",null,{"inputs":[{"name":"u8"}],"output":{"name":"bool"}}],[5,"is_alpha","","ASCII alphabetic predicate.",null,{"inputs":[{"name":"u8"}],"output":{"name":"bool"}}],[5,"is_alphanumeric","","ASCII alphanumeric predicate.",null,{"inputs":[{"name":"u8"}],"output":{"name":"bool"}}],[5,"skip_whitespace","","Skips over whitespace.",null,{"inputs":[{"name":"input"}],"output":{"name":"u8result"}}],[5,"digit","","Parses a single digit.",null,{"inputs":[{"name":"input"}],"output":{"name":"u8result"}}],[5,"signed","","Parses a number with an optional leading '+' or '-'.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"u8result"}}],[5,"decimal","","Parses a series of digits and converts them to an integer.",null,{"inputs":[{"name":"input"}],"output":{"name":"u8result"}}],[0,"buffer","chomp","Utilities for parsing streams of data.",null,null],[3,"SliceStream","chomp::buffer","Stream implementation for immutable slices.",null,null],[3,"Source","","Manages a buffer and data source pair, enabling efficient parsing from a streaming source.",null,null],[3,"FixedSizeBuffer","","A fixed size buffer.",null,null],[3,"GrowingBuffer","","A buffer which will reallocate to fit the requested amount of data.",null,null],[4,"StreamError","","Error type for parsing using the `Stream` trait.",null,null],[13,"ParseError","","An error occurred in the parser, the given slice indicates the part which failed.",3,null],[13,"Incomplete","","Parser failed to complete with the available data.",3,null],[13,"IoError","","An IO-error occurred while attempting to fill the buffer.",3,null],[13,"EndOfInput","","The last parser completed successfully and there is no more input to parse.",3,null],[13,"Retry","","The last parser failed with an incomplete state, fill the buffer and try again.",3,null],[11,"fmt","","",4,null],[11,"new","","",4,{"inputs":[{"name":"r"}],"output":{"name":"self"}}],[11,"from_read","","",4,{"inputs":[{"name":"r"},{"name":"b"}],"output":{"name":"self"}}],[11,"from_iter","","",4,{"inputs":[{"name":"i"},{"name":"b"}],"output":{"name":"self"}}],[11,"with_buffer","","",4,{"inputs":[{"name":"s"},{"name":"b"}],"output":{"name":"self"}}],[11,"fill","","Attempts to fill the buffer to satisfy the last call to `parse()`.",4,null],[11,"len","","the number of bytes left in the buffer.",4,null],[11,"is_empty","","If the buffer is empty and the reader has reached the end.",4,null],[11,"capacity","","",4,null],[11,"buffer","","Borrows the remainder of the buffer.",4,null],[11,"reset","","Resets the buffer state, keeping the current buffer contents and cursor position.",4,null],[11,"set_autofill","","Changes the setting automatic fill feature, `true` will make the buffer automatically\ncall `fill()` on the next call to `parse()` after a `Retry` was encountered.",4,null],[11,"read","","",4,null],[11,"fill_buf","","",4,null],[11,"consume","","",4,null],[11,"parse","","",4,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"fmt","","",5,null],[11,"new","","Creates a fixed-size buffer with the default buffer size.",5,{"inputs":[],"output":{"name":"self"}}],[11,"with_size","","Creates a fixed-size buffer with the supplied buffer size.",5,{"inputs":[{"name":"usize"}],"output":{"name":"self"}}],[11,"deref","","",5,null],[11,"deref_mut","","",5,null],[11,"fill","","",5,null],[11,"request_space","","",5,null],[11,"consume","","",5,null],[11,"len","","",5,null],[11,"capacity","","",5,null],[11,"new","","Creates a new unlimited `GrowingBuffer`.",6,{"inputs":[],"output":{"name":"self"}}],[11,"with_limit","","Creates a new `GrowingBuffer` with the specified limit.",6,{"inputs":[{"name":"usize"}],"output":{"name":"self"}}],[11,"deref","","",6,null],[11,"deref_mut","","",6,null],[11,"fill","","",6,null],[11,"request_space","","",6,null],[11,"consume","","",6,null],[11,"len","","",6,null],[11,"capacity","","",6,null],[11,"hash","","",7,null],[11,"eq","","",7,null],[11,"ne","","",7,null],[11,"fmt","","",7,null],[11,"new","","Creates a new stream from an immutable slice.",7,null],[11,"len","","The number of bytes left in the buffer",7,null],[11,"is_empty","","Returns true if no more bytes are available",7,null],[11,"parse","","",7,null],[0,"data_source","","Implementation of datasources for `Source`.",null,null],[3,"ReadDataSource","chomp::buffer::data_source","Implementation of `DataSource` for `io::Read` instances.",null,null],[3,"IteratorDataSource","","Implementation of `DataSource` for `Iterator`.",null,null],[8,"DataSource","","Abstraction over `io::Read`, `Iterator` and others.",null,null],[16,"Item","","",8,null],[10,"read","","Populates the supplied buffer with data, returns the number of items written.",8,null],[11,"new","","",9,{"inputs":[{"name":"r"}],"output":{"name":"self"}}],[11,"into_inner","","",9,null],[11,"read","","",9,null],[11,"new","","",10,{"inputs":[{"name":"i"}],"output":{"name":"self"}}],[11,"into_inner","","",10,null],[11,"read","","",10,null],[8,"Buffer","chomp::buffer","Trait all parser buffers implement.",null,null],[10,"fill","","Attempt to fill the buffer using the closure `F`.",11,null],[10,"request_space","","Buffer attempts to clear space for additional items.",11,null],[10,"consume","","Consumes the given amount of bytes, must be less than or equal to `len()`.",11,null],[10,"len","","Returns the number of bytes left in the buffer.",11,null],[11,"is_empty","","If the buffer has no more data.",11,null],[10,"capacity","","Returns the maximum amount of data which can be stored",11,null],[8,"Stream","","Trait wrapping the state management in reading from a data source while parsing.",null,null],[16,"Item","","",12,null],[10,"parse","","",12,null],[8,"IntoStream","","Trait for conversion into a `Stream`.",null,null],[16,"Item","","",13,null],[16,"Into","","",13,null],[10,"into_stream","","",13,null],[11,"fmt","","",3,null],[11,"eq","","",3,null],[0,"parsers","chomp","Basic parsers.",null,null],[4,"Error","chomp::parsers","Common error for the basic Chomp parsers, verbose version.",null,null],[13,"Expected","","Expected a specific token",14,null],[13,"Unexpected","","Did not expect the token present in the input stream",14,null],[13,"String","","Expected a specific string of tokens",14,null],[5,"any","","Matches any item, returning it if present.",null,{"inputs":[{"name":"input"}],"output":{"name":"simpleresult"}}],[5,"satisfy","","Matches an item using ``f``, the item is returned if ``f`` yields true, otherwise this parser\nfails.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"simpleresult"}}],[5,"satisfy_with","","Reads a single token, applies the transformation `F` and then succeeds with the transformed\nvaleue if the predicate `P` yields true on this transformed value.",null,{"inputs":[{"name":"input"},{"name":"f"},{"name":"p"}],"output":{"name":"simpleresult"}}],[5,"token","","Matches a single token, returning the match on success.",null,{"inputs":[{"name":"input"},{"name":"i"}],"output":{"name":"simpleresult"}}],[5,"not_token","","Matches a single token as long as it is not equal to `t`, returning the match on success.",null,{"inputs":[{"name":"input"},{"name":"i"}],"output":{"name":"simpleresult"}}],[5,"peek","","Matches any item but does not consume it, on success it gives ``Some`` but if no input remains\n``None`` is produced.",null,{"inputs":[{"name":"input"}],"output":{"name":"simpleresult"}}],[5,"peek_next","","Matches any item but does not consume it.",null,{"inputs":[{"name":"input"}],"output":{"name":"simpleresult"}}],[5,"take","","Matches ``num`` items no matter what they are, returning a slice of the matched items.",null,{"inputs":[{"name":"input"},{"name":"usize"}],"output":{"name":"simpleresult"}}],[5,"take_while","","Matches all items while ``f`` returns false, returns a slice of all the matched items.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"simpleresult"}}],[5,"take_while1","","Matches all items while ``f`` returns true, if at least one item matched this parser succeeds\nand returns a slice of all the matched items.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"simpleresult"}}],[5,"take_till","","Matches all items until ``f`` returns true, all items to that point will be returned as a slice\nupon success.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"simpleresult"}}],[5,"scan","","The predicate consumes and transforms a state argument, this parser will match everything until\nthe predicate returns `None`.",null,{"inputs":[{"name":"input"},{"name":"s"},{"name":"f"}],"output":{"name":"simpleresult"}}],[5,"run_scanner","","Like `scan` but generalized to return the final state of the scanner.",null,{"inputs":[{"name":"input"},{"name":"s"},{"name":"f"}],"output":{"name":"simpleresult"}}],[5,"take_remainder","","Matches the remainder of the buffer and returns it, always succeeds.",null,{"inputs":[{"name":"input"}],"output":{"name":"simpleresult"}}],[5,"string","","Matches the given slice against the parser, returning the matched slice upon success.",null,null],[5,"eof","","Matches the end of the input.",null,{"inputs":[{"name":"input"}],"output":{"name":"simpleresult"}}],[11,"hash","","",14,null],[11,"partial_cmp","","",14,null],[11,"lt","","",14,null],[11,"le","","",14,null],[11,"gt","","",14,null],[11,"ge","","",14,null],[11,"cmp","","",14,null],[11,"eq","","",14,null],[11,"ne","","",14,null],[11,"fmt","","",14,null],[11,"clone","","",14,null],[11,"new","","Creates a new Unexpected error.",14,{"inputs":[],"output":{"name":"self"}}],[11,"fmt","","",14,null],[11,"description","","",14,null],[0,"combinators","chomp","Basic combinators.",null,null],[5,"count","chomp::combinators","Applies the parser ``p`` exactly ``num`` times collecting all items into `T: FromIterator`.",null,{"inputs":[{"name":"input"},{"name":"usize"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"option","","Tries the parser ``f``, on success it yields the parsed value, on failure ``default`` will be\nyielded instead.",null,{"inputs":[{"name":"input"},{"name":"f"},{"name":"t"}],"output":{"name":"parseresult"}}],[5,"or","","Tries to match the parser ``f``, if ``f`` fails it tries ``g``. Returns the success value of\n the first match, otherwise the error of the last one if both fail.",null,{"inputs":[{"name":"input"},{"name":"f"},{"name":"g"}],"output":{"name":"parseresult"}}],[5,"many","","Parses many instances of ``f`` until it does no longer match, collecting all matches into the\ntype `T: FromIterator`.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"many1","","Parses at least one instance of ``f`` and continues until it does no longer match, collecting\n all matches into the type `T: FromIterator`.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"sep_by","","Applies the parser `R` zero or more times, separated by the parser `F`. All matches from `R`\nwill be collected into the type `T: FromIterator`.",null,{"inputs":[{"name":"input"},{"name":"r"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"sep_by1","","Applies the parser `R` one or more times, separated by the parser `F`. All matches from `R`\nwill be collected into the type `T: FromIterator`.",null,{"inputs":[{"name":"input"},{"name":"r"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"many_till","","Applies the parser `R` multiple times until the parser `F` succeeds and returns a\n`T: FromIterator` populated by the values yielded by `R`. Consumes the matched part of `F`.",null,{"inputs":[{"name":"input"},{"name":"r"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"skip_many","","Runs the given parser until it fails, discarding matched input.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"skip_many1","","Runs the given parser until it fails, discarding matched input, expects at least one match.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"matched_by","","Returns the result of the given parser as well as the slice which matched it.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"look_ahead","","Applies the parser `F` without consuming any input.",null,{"inputs":[{"name":"input"},{"name":"f"}],"output":{"name":"parseresult"}}],[0,"bounded","","Bounded versions of combinators.",null,null],[5,"many","chomp::combinators::bounded","Applies the parser `F` multiple times until it fails or the maximum value of the range has\nbeen reached, collecting the successful values into a `T: FromIterator`.",null,{"inputs":[{"name":"input"},{"name":"r"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"skip_many","","Applies the parser `F` multiple times until it fails or the maximum value of the range has\nbeen reached, throwing away any produced value.",null,{"inputs":[{"name":"input"},{"name":"r"},{"name":"f"}],"output":{"name":"parseresult"}}],[5,"many_till","","Applies the parser `P` multiple times until the parser `F` succeeds and returns a value\npopulated by the values yielded by `P`. Consumes the matched part of `F`. If `F` does not\nsucceed within the given range `R` this combinator will propagate any failure from `P`.",null,{"inputs":[{"name":"input"},{"name":"r"},{"name":"p"},{"name":"f"}],"output":{"name":"parseresult"}}],[8,"BoundedRange","","Trait for applying a parser multiple times based on a range.",null,null],[10,"parse_many","","Applies the parser `F` multiple times until it fails or the maximum value of the range has\nbeen reached, collecting the successful values into a `T: FromIterator`.",15,null],[10,"skip_many","","Applies the parser `F` multiple times until it fails or the maximum value of the range has\nbeen reached, throwing away any produced value.",15,null],[10,"many_till","","Applies the parser `P` multiple times until the parser `F` succeeds and returns a value\npopulated by the values yielded by `P`. Consumes the matched part of `F`. If `F` does not\nsucceed within the given range `R` this combinator will propagate any failure from `P`.",15,null],[0,"primitives","chomp","Module used to construct fundamental parsers and combinators.",null,null],[4,"State","chomp::primitives","**Primitive:** Primitive inner type containing the parse-state.",null,null],[13,"Data","","",16,null],[13,"Error","","",16,null],[13,"Incomplete","","The number of additional items requested",16,null],[0,"input","","Input utilities.",null,null],[5,"new","chomp::primitives::input","**Primitive:** Creates a new input from the given state and buffer.",null,null],[17,"DEFAULT","","Default (empty) input state.",null,null],[17,"END_OF_INPUT","","If set the current slice of input is the last one.",null,null],[0,"parse_result","chomp::primitives","ParseResult utilities.",null,null],[5,"new","chomp::primitives::parse_result","**Primitive:** Creates a new `ParseResult`.",null,{"inputs":[{"name":"state"}],"output":{"name":"parseresult"}}],[8,"InputBuffer","chomp::primitives","**Primitive:** Trait exposing the buffer of `Input`.",null,null],[16,"Item","","",17,null],[10,"buffer","","Reveals the internal buffer containig the remainder of the input.",17,null],[10,"replace","","Modifies the inner data without leaving the `Input` context.",17,null],[10,"is_last_slice","","Returns true if this is the last available slice of the input.",17,null],[8,"InputClone","","**Primitive:** Trait limiting the use of `Clone` for `Input`.",null,null],[10,"clone","","Creates a clone of the instance.",18,null],[8,"IntoInner","","**Primitive:** Consumes self and reveals the inner state.",null,null],[16,"Inner","","",19,null],[10,"into_inner","","**Primitive:** Consumes self and reveals the inner state.",19,null],[6,"SimpleResult","chomp","Result returned from the basic parsers.",null,null],[6,"U8Result","","Result for dealing with the basic parsers when parsing a stream of `u8`.",null,null],[14,"parse!","","Macro emulating `do`-notation for the parser monad, automatically threading the linear type.",null,null],[14,"parser!","","Macro wrapping an invocation to ``parse!`` in a closure, useful for creating parsers inline.",null,null],[11,"hash","chomp::primitives","",16,null],[11,"partial_cmp","","",16,null],[11,"lt","","",16,null],[11,"le","","",16,null],[11,"gt","","",16,null],[11,"ge","","",16,null],[11,"cmp","","",16,null],[11,"eq","","",16,null],[11,"ne","","",16,null],[11,"fmt","","",16,null],[11,"is_empty","chomp::buffer","If the buffer has no more data.",11,null]],"paths":[[4,"ParseError"],[3,"Input"],[3,"ParseResult"],[4,"StreamError"],[3,"Source"],[3,"FixedSizeBuffer"],[3,"GrowingBuffer"],[3,"SliceStream"],[8,"DataSource"],[3,"ReadDataSource"],[3,"IteratorDataSource"],[8,"Buffer"],[8,"Stream"],[8,"IntoStream"],[4,"Error"],[8,"BoundedRange"],[4,"State"],[8,"InputBuffer"],[8,"InputClone"],[8,"IntoInner"]]}; initSearch(searchIndex);