var searchIndex = {}; searchIndex["cssparser"] = {"doc":"Implementation of [CSS Syntax Module Level 3](https://drafts.csswg.org/css-syntax/) for Rust.","items":[[3,"NumericValue","cssparser","The numeric value of `Number` and `Dimension` tokens.",null,null],[12,"value","","The value as a float",0,null],[12,"int_value","","If the origin source did not include a fractional part, the value as an integer.",0,null],[12,"has_sign","","Whether the number had a `+` or `-` sign.",0,null],[3,"PercentageValue","","The numeric value of `Percentage` tokens.",null,null],[12,"unit_value","","The value as a float, divided by 100 so that the nominal range is 0.0 to 1.0.",1,null],[12,"int_value","","If the origin source did not include a fractional part, the value as an integer. It is **not** divided by 100.",1,null],[12,"has_sign","","Whether the number had a `+` or `-` sign.",1,null],[3,"SourceLocation","","The line and column number for a given position within the input.",null,null],[12,"line","","The line number, starting at 1 for the first line.",2,null],[12,"column","","The column number within a line, starting at 1 for the character of the line.",2,null],[3,"DeclarationListParser","","Provides an iterator for declaration list parsing.",null,null],[12,"input","","The input given to `DeclarationListParser::new`",3,null],[12,"parser","","The parser given to `DeclarationListParser::new`",3,null],[3,"RuleListParser","","Provides an iterator for rule list parsing.",null,null],[12,"input","","The input given to `RuleListParser::new`",4,null],[12,"parser","","The parser given to `RuleListParser::new`",4,null],[3,"RGBA","","A color with red, green, blue, and alpha components.",null,null],[12,"red","","The red channel. Nominally in 0.0 ... 1.0.",5,null],[12,"green","","The green channel. Nominally in 0.0 ... 1.0.",5,null],[12,"blue","","The blue channel. Nominally in 0.0 ... 1.0.",5,null],[12,"alpha","","The alpha (opacity) channel. Clamped to 0.0 ... 1.0.",5,null],[3,"CssStringWriter","","A `fmt::Write` adapter that escapes text for writing as a double-quoted CSS string.\nQuotes are not included.",null,null],[3,"TokenSerializationType","","A category of token. See the `needs_separator_when_before` method.",null,null],[3,"Parser","","A CSS parser that borrows its `&str` input,\nyields `Token`s,\nand keeps track of nested blocks and functions.",null,null],[3,"Delimiters","","A set of characters, to be used with the `Parser::parse_until*` methods.",null,null],[3,"SourcePosition","","A capture of the internal state of a `Parser` (including the position within the input),\nobtained from the `Parser::position` method.",null,null],[4,"Token","","One of the pieces the CSS input is broken into.",null,null],[13,"Ident","","A [`<ident-token>`](https://drafts.csswg.org/css-syntax/#ident-token-diagram)",6,null],[13,"AtKeyword","","A [`<at-keyword-token>`](https://drafts.csswg.org/css-syntax/#at-keyword-token-diagram)",6,null],[13,"Hash","","A [`<hash-token>`](https://drafts.csswg.org/css-syntax/#hash-token-diagram) with the type flag set to "unrestricted"",6,null],[13,"IDHash","","A [`<hash-token>`](https://drafts.csswg.org/css-syntax/#hash-token-diagram) with the type flag set to "id"",6,null],[13,"QuotedString","","A [`<string-token>`](https://drafts.csswg.org/css-syntax/#string-token-diagram)",6,null],[13,"UnquotedUrl","","A [`<url-token>`](https://drafts.csswg.org/css-syntax/#url-token-diagram) or `url( <string-token> )` function",6,null],[13,"Delim","","A `<delim-token>`",6,null],[13,"Number","","A [`<number-token>`](https://drafts.csswg.org/css-syntax/#number-token-diagram)",6,null],[13,"Percentage","","A [`<percentage-token>`](https://drafts.csswg.org/css-syntax/#percentage-token-diagram)",6,null],[13,"Dimension","","A [`<dimension-token>`](https://drafts.csswg.org/css-syntax/#dimension-token-diagram)",6,null],[13,"UnicodeRange","","A [`<unicode-range-token>`](https://drafts.csswg.org/css-syntax/#unicode-range-token-diagram)",6,null],[13,"WhiteSpace","","A [`<whitespace-token>`](https://drafts.csswg.org/css-syntax/#whitespace-token-diagram)",6,null],[13,"Comment","","A comment.",6,null],[13,"Colon","","A `:` `<colon-token>`",6,null],[13,"Semicolon","","A `;` `<semicolon-token>`",6,null],[13,"Comma","","A `,` `<comma-token>`",6,null],[13,"IncludeMatch","","A `~=` [`<include-match-token>`](https://drafts.csswg.org/css-syntax/#include-match-token-diagram)",6,null],[13,"DashMatch","","A `|=` [`<dash-match-token>`](https://drafts.csswg.org/css-syntax/#dash-match-token-diagram)",6,null],[13,"PrefixMatch","","A `^=` [`<prefix-match-token>`](https://drafts.csswg.org/css-syntax/#prefix-match-token-diagram)",6,null],[13,"SuffixMatch","","A `$=` [`<suffix-match-token>`](https://drafts.csswg.org/css-syntax/#suffix-match-token-diagram)",6,null],[13,"SubstringMatch","","A `*=` [`<substring-match-token>`](https://drafts.csswg.org/css-syntax/#substring-match-token-diagram)",6,null],[13,"Column","","A `||` [`<column-token>`](https://drafts.csswg.org/css-syntax/#column-token-diagram)",6,null],[13,"CDO","","A `<!--` [`<CDO-token>`](https://drafts.csswg.org/css-syntax/#CDO-token-diagram)",6,null],[13,"CDC","","A `-->` [`<CDC-token>`](https://drafts.csswg.org/css-syntax/#CDC-token-diagram)",6,null],[13,"Function","","A [`<function-token>`](https://drafts.csswg.org/css-syntax/#function-token-diagram)",6,null],[13,"ParenthesisBlock","","A `<(-token>`",6,null],[13,"SquareBracketBlock","","A `<[-token>`",6,null],[13,"CurlyBracketBlock","","A `<{-token>`",6,null],[13,"BadUrl","","A `<bad-url-token>`",6,null],[13,"BadString","","A `<bad-string-token>`",6,null],[13,"CloseParenthesis","","A `<)-token>`",6,null],[13,"CloseSquareBracket","","A `<]-token>`",6,null],[13,"CloseCurlyBracket","","A `<}-token>`",6,null],[4,"AtRuleType","","The return value for `AtRuleParser::parse_prelude`.\nIndicates whether the at-rule is expected to have a `{ /* ... */ }` block\nor end with a `;` semicolon.",null,null],[13,"WithoutBlock","","The at-rule is expected to end with a `;` semicolon. Example: `@import`.",7,null],[13,"WithBlock","","The at-rule is expected to have a a `{ /* ... */ }` block. Example: `@media`",7,null],[13,"OptionalBlock","","The at-rule may either have a block or end with a semicolon.",7,null],[4,"Color","","A <color> value.",null,null],[13,"CurrentColor","","The 'currentColor' keyword",8,null],[13,"RGBA","","Everything else gets converted to RGBA during parsing",8,null],[5,"parse_important","","Parse `!important`.",null,{"inputs":[{"name":"parser"}],"output":{"name":"result"}}],[5,"parse_one_declaration","","Parse a single declaration, such as an `( /* ... */ )` parenthesis in an `@supports` prelude.",null,{"inputs":[{"name":"parser"},{"name":"p"}],"output":{"name":"result"}}],[5,"parse_one_rule","","Parse a single rule, such as for CSSOM’s `CSSStyleSheet.insertRule`.",null,{"inputs":[{"name":"parser"},{"name":"p"}],"output":{"name":"result"}}],[5,"decode_stylesheet_bytes","","Determine the character encoding of a CSS stylesheet and decode it.",null,null],[5,"parse_color_keyword","","Return the named color with the given name.",null,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[5,"parse_nth","","Parse the *An+B* notation, as found in the `:nth-child()` selector.\nThe input is typically the arguments of a function,\nin which case the caller needs to check if the arguments’ parser is exhausted.\nReturn `Ok((A, B))`, or `Err(())` for a syntax error.",null,{"inputs":[{"name":"parser"}],"output":{"name":"result"}}],[5,"serialize_identifier","","Write a CSS identifier, escaping characters as necessary.",null,{"inputs":[{"name":"str"},{"name":"w"}],"output":{"name":"result"}}],[5,"serialize_string","","Write a double-quoted CSS string token, escaping content as necessary.",null,{"inputs":[{"name":"str"},{"name":"w"}],"output":{"name":"result"}}],[0,"Delimiter","","`Delimiters` constants.",null,null],[17,"None","cssparser::Delimiter","The empty delimiter set",null,null],[17,"CurlyBracketBlock","","The delimiter set with only the `{` opening curly bracket",null,null],[17,"Semicolon","","The delimiter set with only the `;` semicolon",null,null],[17,"Bang","","The delimiter set with only the `!` exclamation point",null,null],[17,"Comma","","The delimiter set with only the `,` comma",null,null],[11,"new","cssparser","Create a new `DeclarationListParser` for the given `input` and `parser`.",3,{"inputs":[{"name":"parser"},{"name":"p"}],"output":{"name":"declarationlistparser"}}],[11,"next","","",3,null],[11,"new_for_stylesheet","","Create a new `RuleListParser` for the given `input` at the top-level of a stylesheet\nand the given `parser`.",4,{"inputs":[{"name":"parser"},{"name":"p"}],"output":{"name":"rulelistparser"}}],[11,"new_for_nested_rule","","Same is `new_for_stylesheet`, but should be used for rule lists inside a block\nsuch as the body of an `@media` rule.",4,{"inputs":[{"name":"parser"},{"name":"p"}],"output":{"name":"rulelistparser"}}],[11,"next","","",4,null],[11,"clone","","",6,null],[11,"fmt","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"is_parse_error","","Return whether this token represents a parse error.",6,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"clone","","",2,null],[11,"fmt","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"clone","","",9,null],[11,"fmt","","",9,null],[11,"eq","","",9,null],[11,"ne","","",9,null],[11,"clone","","",10,null],[11,"fmt","","",11,null],[11,"eq","","",11,null],[11,"ne","","",11,null],[11,"clone","","",11,null],[11,"bitor","","",11,null],[11,"new","","Create a new parser",10,{"inputs":[{"name":"str"}],"output":{"name":"parser"}}],[11,"is_exhausted","","Check whether the input is exhausted. That is, if `.next()` would return a token.",10,null],[11,"expect_exhausted","","Check whether the input is exhausted. That is, if `.next()` would return a token.\nReturn a `Result` so that the `try!` macro can be used: `try!(input.expect_exhausted())`",10,null],[11,"position","","Return the current internal state of the parser (including position within the input).",10,null],[11,"reset","","Restore the internal state of the parser (including position within the input)\nto what was previously saved by the `Parser::position` method.",10,null],[11,"look_for_var_functions","","Start looking for `var()` functions. (See the `.seen_var_functions()` method.)",10,null],[11,"seen_var_functions","","Return whether a `var()` function has been seen by the tokenizer since\neither `look_for_var_functions` was called, and stop looking.",10,null],[11,"try","","Execute the given closure, passing it the parser.\nIf the result (returned unchanged) is `Err`,\nthe internal state of the parser (including position within the input)\nis restored to what it was before the call.",10,null],[11,"slice","","Return a slice of the CSS input",10,null],[11,"slice_from","","Return a slice of the CSS input, from the given position to the current one.",10,null],[11,"current_source_location","","Return the line and column number within the input for the current position.",10,null],[11,"source_location","","Return the line and column number within the input for the given position.",10,null],[11,"next","","Return the next token in the input that is neither whitespace or a comment,\nand advance the position accordingly.",10,null],[11,"next_including_whitespace","","Same as `Parser::next`, but does not skip whitespace tokens.",10,null],[11,"next_including_whitespace_and_comments","","Same as `Parser::next`, but does not skip whitespace or comment tokens.",10,null],[11,"parse_entirely","","Have the given closure parse something, then check the the input is exhausted.\nThe result is overridden to `Err(())` if some input remains.",10,null],[11,"parse_comma_separated","","Parse a list of comma-separated values, all with the same syntax.",10,null],[11,"parse_nested_block","","Parse the content of a block or function.",10,null],[11,"parse_until_before","","Limit parsing to until a given delimiter. (E.g. a semicolon for a property value.)",10,null],[11,"parse_until_after","","Like `parse_until_before`, but also consume the delimiter token.",10,null],[11,"expect_whitespace","","Parse a <whitespace-token> and return its value.",10,null],[11,"expect_ident","","Parse a <ident-token> and return the unescaped value.",10,null],[11,"expect_ident_matching","","Parse a <ident-token> whose unescaped value is an ASCII-insensitive match for the given value.",10,null],[11,"expect_string","","Parse a <string-token> and return the unescaped value.",10,null],[11,"expect_ident_or_string","","Parse either a <ident-token> or a <string-token>, and return the unescaped value.",10,null],[11,"expect_url","","Parse a <url-token> and return the unescaped value.",10,null],[11,"expect_url_or_string","","Parse either a <url-token> or a <string-token>, and return the unescaped value.",10,null],[11,"expect_number","","Parse a <number-token> and return the integer value.",10,null],[11,"expect_integer","","Parse a <number-token> that does not have a fractional part, and return the integer value.",10,null],[11,"expect_percentage","","Parse a <percentage-token> and return the value.\n`0%` and `100%` map to `0.0` and `1.0` (not `100.0`), respectively.",10,null],[11,"expect_colon","","Parse a `:` <colon-token>.",10,null],[11,"expect_semicolon","","Parse a `;` <semicolon-token>.",10,null],[11,"expect_comma","","Parse a `,` <comma-token>.",10,null],[11,"expect_delim","","Parse a <delim-token> with the given value.",10,null],[11,"expect_curly_bracket_block","","Parse a `{ /* ... */ }` curly brackets block.",10,null],[11,"expect_square_bracket_block","","Parse a `[ /* ... */ ]` square brackets block.",10,null],[11,"expect_parenthesis_block","","Parse a `( /* ... */ )` parenthesis block.",10,null],[11,"expect_function","","Parse a <function> token and return its name.",10,null],[11,"expect_function_matching","","Parse a <function> token whose name is an ASCII-insensitive match for the given value.",10,null],[11,"expect_no_error_token","","Parse the input until exhaustion and check that it contains no “error” token.",10,null],[11,"fmt","","",5,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"clone","","",5,null],[11,"to_css","","",5,null],[11,"fmt","","",8,null],[11,"eq","","",8,null],[11,"ne","","",8,null],[11,"clone","","",8,null],[11,"to_css","","",8,null],[11,"parse","","Parse a <color> value, per CSS Color Module Level 3.",8,{"inputs":[{"name":"parser"}],"output":{"name":"result"}}],[11,"to_css","","",6,null],[11,"new","","Wrap a text writer to create a `CssStringWriter`.",12,{"inputs":[{"name":"w"}],"output":{"name":"cssstringwriter"}}],[11,"write_str","","",12,null],[11,"fmt","","",13,null],[11,"eq","","",13,null],[11,"ne","","",13,null],[11,"clone","","",13,null],[11,"nothing","","Return a value that represents the absence of a token, e.g. before the start of the input.",13,{"inputs":[],"output":{"name":"tokenserializationtype"}}],[11,"set_if_nothing","","If this value is `TokenSerializationType::nothing()`, set it to the given value instead.",13,null],[11,"needs_separator_when_before","","Return true if, when a token of category `self` is serialized just before\na token of category `other` with no whitespace in between,\nan empty comment `/**/` needs to be inserted between them\nso that they are not re-parsed as a single token.",13,null],[11,"serialization_type","","Categorize a token into a type that determines when `/**/` needs to be inserted\nbetween two tokens when serialized next to each other without whitespace in between.",6,null],[8,"DeclarationParser","","A trait to provide various parsing of declaration values.",null,null],[16,"Declaration","","The finished representation of a declaration.",14,null],[10,"parse_value","","Parse the value of a declaration with the given `name`.",14,null],[8,"QualifiedRuleParser","","A trait to provide various parsing of qualified rules.",null,null],[16,"Prelude","","The intermediate representation of a qualified rule prelude.",15,null],[16,"QualifiedRule","","The finished representation of a qualified rule.",15,null],[11,"parse_prelude","","Parse the prelude of a qualified rule. For style rules, this is as Selector list.",15,null],[11,"parse_block","","Parse the content of a `{ /* ... */ }` block for the body of the qualified rule.",15,null],[8,"AtRuleParser","","A trait to provide various parsing of at-rules.",null,null],[16,"Prelude","","The intermediate representation of an at-rule prelude.",16,null],[16,"AtRule","","The finished representation of an at-rule.",16,null],[11,"parse_prelude","","Parse the prelude of an at-rule with the given `name`.",16,null],[11,"parse_block","","Parse the content of a `{ /* ... */ }` block for the body of the at-rule.",16,null],[11,"rule_without_block","","An `OptionalBlock` prelude was followed by `;`.",16,null],[8,"ToCss","","Trait for things the can serialize themselves in CSS syntax.",null,null],[10,"to_css","","Serialize `self` in CSS syntax, writing to `dest`.",17,null],[11,"to_css_string","","Serialize `self` in CSS syntax and return a string.",17,null],[11,"fmt_to_css","","Serialize `self` in CSS syntax and return a result compatible with `std::fmt::Show`.",17,null],[14,"match_ignore_ascii_case!","","This macro is equivalent to a `match` expression on an `&str` value,\nbut matching is case-insensitive in the ASCII range.",null,null],[11,"parse_prelude","","Parse the prelude of an at-rule with the given `name`.",16,null],[11,"parse_block","","Parse the content of a `{ /* ... */ }` block for the body of the at-rule.",16,null],[11,"rule_without_block","","An `OptionalBlock` prelude was followed by `;`.",16,null],[11,"parse_prelude","","Parse the prelude of a qualified rule. For style rules, this is as Selector list.",15,null],[11,"parse_block","","Parse the content of a `{ /* ... */ }` block for the body of the qualified rule.",15,null],[11,"to_css_string","","Serialize `self` in CSS syntax and return a string.",17,null],[11,"fmt_to_css","","Serialize `self` in CSS syntax and return a result compatible with `std::fmt::Show`.",17,null]],"paths":[[3,"NumericValue"],[3,"PercentageValue"],[3,"SourceLocation"],[3,"DeclarationListParser"],[3,"RuleListParser"],[3,"RGBA"],[4,"Token"],[4,"AtRuleType"],[4,"Color"],[3,"SourcePosition"],[3,"Parser"],[3,"Delimiters"],[3,"CssStringWriter"],[3,"TokenSerializationType"],[8,"DeclarationParser"],[8,"QualifiedRuleParser"],[8,"AtRuleParser"],[8,"ToCss"]]}; initSearch(searchIndex);