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],[11,"hash","","",0,null],[11,"partial_cmp","","",0,null],[11,"lt","","",0,null],[11,"le","","",0,null],[11,"gt","","",0,null],[11,"ge","","",0,null],[11,"cmp","","",0,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"fmt","","",0,null],[11,"new","","Creates a new `Input` to start parsing with.",0,null],[11,"ret","","Returns `t` as a success value in the parsing context.",0,null],[11,"err","","Returns `e` as an error value in the parsing context.",0,null],[11,"incomplete","","Notifies that a parser has reached the end of the currently supplied slice but requires\nmore data.",0,null],[11,"from_result","","Converts a `Result` into a `ParseResult`, preserving parser state.",0,null],[11,"clone","","",0,null],[11,"buffer","","",0,null],[11,"replace","","",0,null],[11,"is_last_slice","","",0,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,"bind","","Sequentially composes the result with a parse action ``f``, passing any produced value as\nthe second parameter.",1,null],[11,"then","","Sequentially composes the result with a parse action ``f``, discarding any produced value.",1,null],[11,"map","","Applies the function `f` on the contained data if the parser is in a success state.",1,null],[11,"map_err","","Applies the function `f` on the contained error if the parser is in an error state.",1,null],[11,"inspect","","Calls the function `f` with a reference of the contained data if the parser is in a success\nstate.",1,null],[11,"unwrap","","Unwraps a parse result, yielding the content of the success-state.",1,null],[11,"expect","","Unwraps a parse result, yielding the contents of the success state.",1,null],[11,"unwrap_err","","Unwraps a parse result, yielding the contents of the error state.",1,null],[11,"into_inner","","",1,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,"ParseError","","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.",2,null],[13,"Incomplete","","Parser failed to complete with the available data.",2,null],[13,"IoError","","An IO-error occurred while attempting to fill the buffer.",2,null],[13,"EndOfInput","","The last parser completed successfully and there is no more input to parse.",2,null],[13,"Retry","","The last parser failed with an incomplete state, fill the buffer and try again.",2,null],[11,"fmt","","",3,null],[11,"new","","",3,{"inputs":[{"name":"r"}],"output":{"name":"self"}}],[11,"from_read","","",3,{"inputs":[{"name":"r"},{"name":"b"}],"output":{"name":"self"}}],[11,"from_iter","","",3,{"inputs":[{"name":"i"},{"name":"b"}],"output":{"name":"self"}}],[11,"with_buffer","","",3,{"inputs":[{"name":"s"},{"name":"b"}],"output":{"name":"self"}}],[11,"fill","","Attempts to fill the buffer to satisfy the last call to `parse()`.",3,null],[11,"len","","the number of bytes left in the buffer.",3,null],[11,"is_empty","","If the buffer is empty and the reader has reached the end.",3,null],[11,"capacity","","",3,null],[11,"buffer","","Borrows the remainder of the buffer.",3,null],[11,"reset","","Resets the buffer state, keeping the current buffer contents and cursor position.",3,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.",3,null],[11,"read","","",3,null],[11,"fill_buf","","",3,null],[11,"consume","","",3,null],[11,"parse","","",3,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"fmt","","",4,null],[11,"new","","Creates a fixed-size buffer with the default buffer size.",4,{"inputs":[],"output":{"name":"self"}}],[11,"with_size","","Creates a fixed-size buffer with the supplied buffer size.",4,{"inputs":[{"name":"usize"}],"output":{"name":"self"}}],[11,"deref","","",4,null],[11,"deref_mut","","",4,null],[11,"fill","","",4,null],[11,"request_space","","",4,null],[11,"consume","","",4,null],[11,"len","","",4,null],[11,"capacity","","",4,null],[11,"new","","Creates a new unlimited `GrowingBuffer`.",5,{"inputs":[],"output":{"name":"self"}}],[11,"with_limit","","Creates a new `GrowingBuffer` with the specified limit.",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,"hash","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"fmt","","",6,null],[11,"new","","Creates a new stream from an immutable slice.",6,null],[11,"len","","The number of bytes left in the buffer",6,null],[11,"is_empty","","Returns true if no more bytes are available",6,null],[11,"parse","","",6,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","","",7,null],[10,"read","","Populates the supplied buffer with data, returns the number of items written.",7,null],[11,"new","","",8,{"inputs":[{"name":"r"}],"output":{"name":"self"}}],[11,"into_inner","","",8,null],[11,"read","","",8,null],[11,"new","","",9,{"inputs":[{"name":"i"}],"output":{"name":"self"}}],[11,"into_inner","","",9,null],[11,"read","","",9,null],[8,"Buffer","chomp::buffer","Trait all parser buffers implement.",null,null],[10,"fill","","Attempt to fill the buffer using the closure `F`.",10,null],[10,"request_space","","Buffer attempts to clear space for additional items.",10,null],[10,"consume","","Consumes the given amount of bytes, must be less than or equal to `len()`.",10,null],[10,"len","","Returns the number of bytes left in the buffer.",10,null],[11,"is_empty","","If the buffer has no more data.",10,null],[10,"capacity","","Returns the maximum amount of data which can be stored",10,null],[8,"Stream","","Trait wrapping the state management in reading from a data source while parsing.",null,null],[16,"Item","","",11,null],[10,"parse","","",11,null],[8,"IntoStream","","Trait for conversion into a `Stream`.",null,null],[16,"Item","","",12,null],[16,"Into","","",12,null],[10,"into_stream","","",12,null],[11,"fmt","","",2,null],[11,"eq","","",2,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",13,null],[13,"Unexpected","","Did not expect the token present in the input stream",13,null],[13,"String","","Expected a specific string of tokens",13,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","","",13,null],[11,"partial_cmp","","",13,null],[11,"lt","","",13,null],[11,"le","","",13,null],[11,"gt","","",13,null],[11,"ge","","",13,null],[11,"cmp","","",13,null],[11,"eq","","",13,null],[11,"ne","","",13,null],[11,"fmt","","",13,null],[11,"clone","","",13,null],[11,"new","","Creates a new Unexpected error.",13,{"inputs":[],"output":{"name":"self"}}],[11,"fmt","","",13,null],[11,"description","","",13,null],[0,"combinators","chomp","Basic combinators.",null,null],[5,"count","chomp::combinators","Applies the parser ``p`` exactly ``num`` times, propagating any error or incomplete state.",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, returning all matches.",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,\n returning all matches.",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` implementing `IntoIterator`.",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` implementing `IntoIterator`.",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 value\npopulated 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,"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","","",14,null],[13,"Error","","",14,null],[13,"Incomplete","","The number of additional items requested",14,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","","",15,null],[10,"buffer","","Reveals the internal buffer containig the remainder of the input.",15,null],[10,"replace","","Modifies the inner data without leaving the `Input` context.",15,null],[10,"is_last_slice","","Returns true if this is the last available slice of the input.",15,null],[8,"InputClone","","**Primitive:** Trait limiting the use of `Clone` for `Input`.",null,null],[10,"clone","","Creates a clone of the instance.",16,null],[8,"IntoInner","","**Primitive:** Consumes self and reveals the inner state.",null,null],[16,"Inner","","",17,null],[10,"into_inner","","**Primitive:** Consumes self and reveals the inner state.",17,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","",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,"is_empty","chomp::buffer","If the buffer has no more data.",10,null]],"paths":[[3,"Input"],[3,"ParseResult"],[4,"ParseError"],[3,"Source"],[3,"FixedSizeBuffer"],[3,"GrowingBuffer"],[3,"SliceStream"],[8,"DataSource"],[3,"ReadDataSource"],[3,"IteratorDataSource"],[8,"Buffer"],[8,"Stream"],[8,"IntoStream"],[4,"Error"],[4,"State"],[8,"InputBuffer"],[8,"InputClone"],[8,"IntoInner"]]}; initSearch(searchIndex);