struct PropertyDeclarationParser<'a, 'b: 'a, 'i> {
context: &'a ParserContext<'b>,
state: &'a mut DeclarationParserState<'i>,
}
Expand description
A struct to parse property declarations.
Fields§
§context: &'a ParserContext<'b>
§state: &'a mut DeclarationParserState<'i>
Trait Implementations§
source§impl<'a, 'b, 'i> AtRuleParser<'i> for PropertyDeclarationParser<'a, 'b, 'i>
impl<'a, 'b, 'i> AtRuleParser<'i> for PropertyDeclarationParser<'a, 'b, 'i>
Default methods reject all at rules.
§type Error = StyleParseErrorKind<'i>
type Error = StyleParseErrorKind<'i>
The error type that is included in the ParseError value that can be returned.
source§fn parse_prelude<'t>(
&mut self,
name: CowRcStr<'i>,
input: &mut Parser<'i, 't>,
) -> Result<Self::Prelude, ParseError<'i, Self::Error>>
fn parse_prelude<'t>( &mut self, name: CowRcStr<'i>, input: &mut Parser<'i, 't>, ) -> Result<Self::Prelude, ParseError<'i, Self::Error>>
Parse the prelude of an at-rule with the given
name
. Read moresource§fn rule_without_block(
&mut self,
prelude: Self::Prelude,
start: &ParserState,
) -> Result<Self::AtRule, ()>
fn rule_without_block( &mut self, prelude: Self::Prelude, start: &ParserState, ) -> Result<Self::AtRule, ()>
End an at-rule which doesn’t have block. Return the finished
representation of the at-rule. Read more
source§fn parse_block<'t>(
&mut self,
prelude: Self::Prelude,
start: &ParserState,
input: &mut Parser<'i, 't>,
) -> Result<Self::AtRule, ParseError<'i, Self::Error>>
fn parse_block<'t>( &mut self, prelude: Self::Prelude, start: &ParserState, input: &mut Parser<'i, 't>, ) -> Result<Self::AtRule, ParseError<'i, Self::Error>>
Parse the content of a
{ /* ... */ }
block for the body of the at-rule. Read moresource§impl<'a, 'b, 'i> DeclarationParser<'i> for PropertyDeclarationParser<'a, 'b, 'i>
impl<'a, 'b, 'i> DeclarationParser<'i> for PropertyDeclarationParser<'a, 'b, 'i>
§type Declaration = ()
type Declaration = ()
The finished representation of a declaration.
§type Error = StyleParseErrorKind<'i>
type Error = StyleParseErrorKind<'i>
The error type that is included in the ParseError value that can be returned.
source§fn parse_value<'t>(
&mut self,
name: CowRcStr<'i>,
input: &mut Parser<'i, 't>,
) -> Result<(), ParseError<'i>>
fn parse_value<'t>( &mut self, name: CowRcStr<'i>, input: &mut Parser<'i, 't>, ) -> Result<(), ParseError<'i>>
Parse the value of a declaration with the given
name
. Read moresource§impl<'a, 'b, 'i> QualifiedRuleParser<'i> for PropertyDeclarationParser<'a, 'b, 'i>
impl<'a, 'b, 'i> QualifiedRuleParser<'i> for PropertyDeclarationParser<'a, 'b, 'i>
Default methods reject all rules.
§type QualifiedRule = ()
type QualifiedRule = ()
The finished representation of a qualified rule.
§type Error = StyleParseErrorKind<'i>
type Error = StyleParseErrorKind<'i>
The error type that is included in the ParseError value that can be returned.
source§fn parse_prelude<'t>(
&mut self,
input: &mut Parser<'i, 't>,
) -> Result<Self::Prelude, ParseError<'i, Self::Error>>
fn parse_prelude<'t>( &mut self, input: &mut Parser<'i, 't>, ) -> Result<Self::Prelude, ParseError<'i, Self::Error>>
Parse the prelude of a qualified rule. For style rules, this is as Selector list. Read more
source§fn parse_block<'t>(
&mut self,
prelude: Self::Prelude,
start: &ParserState,
input: &mut Parser<'i, 't>,
) -> Result<Self::QualifiedRule, ParseError<'i, Self::Error>>
fn parse_block<'t>( &mut self, prelude: Self::Prelude, start: &ParserState, input: &mut Parser<'i, 't>, ) -> Result<Self::QualifiedRule, ParseError<'i, Self::Error>>
Parse the content of a
{ /* ... */ }
block for the body of the qualified rule. Read moresource§impl<'a, 'b, 'i> RuleBodyItemParser<'i, (), StyleParseErrorKind<'i>> for PropertyDeclarationParser<'a, 'b, 'i>
impl<'a, 'b, 'i> RuleBodyItemParser<'i, (), StyleParseErrorKind<'i>> for PropertyDeclarationParser<'a, 'b, 'i>
source§fn parse_declarations(&self) -> bool
fn parse_declarations(&self) -> bool
Whether we should attempt to parse declarations. If you know you won’t, returning false
here is slightly faster.
source§fn parse_qualified(&self) -> bool
fn parse_qualified(&self) -> bool
Whether we should attempt to parse qualified rules. If you know you won’t, returning false
would be slightly faster.
Auto Trait Implementations§
impl<'a, 'b, 'i> Freeze for PropertyDeclarationParser<'a, 'b, 'i>
impl<'a, 'b, 'i> !RefUnwindSafe for PropertyDeclarationParser<'a, 'b, 'i>
impl<'a, 'b, 'i> !Send for PropertyDeclarationParser<'a, 'b, 'i>
impl<'a, 'b, 'i> !Sync for PropertyDeclarationParser<'a, 'b, 'i>
impl<'a, 'b, 'i> Unpin for PropertyDeclarationParser<'a, 'b, 'i>
impl<'a, 'b, 'i> !UnwindSafe for PropertyDeclarationParser<'a, 'b, 'i>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert