Struct style::counter_style::CounterStyleRuleParser
source · struct CounterStyleRuleParser<'a, 'b: 'a> {
context: &'a ParserContext<'b>,
rule: &'a mut CounterStyleRuleData,
}
Fields§
§context: &'a ParserContext<'b>
§rule: &'a mut CounterStyleRuleData
Trait Implementations§
source§impl<'a, 'b, 'i> AtRuleParser<'i> for CounterStyleRuleParser<'a, 'b>
impl<'a, 'b, 'i> AtRuleParser<'i> for CounterStyleRuleParser<'a, 'b>
Default methods reject all at rules.
source§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 CounterStyleRuleParser<'a, 'b>
impl<'a, 'b, 'i> DeclarationParser<'i> for CounterStyleRuleParser<'a, 'b>
source§type Declaration = ()
type Declaration = ()
The finished representation of a declaration.
source§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 CounterStyleRuleParser<'a, 'b>
impl<'a, 'b, 'i> QualifiedRuleParser<'i> for CounterStyleRuleParser<'a, 'b>
source§type QualifiedRule = ()
type QualifiedRule = ()
The finished representation of a qualified rule.
source§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 CounterStyleRuleParser<'a, 'b>
impl<'a, 'b, 'i> RuleBodyItemParser<'i, (), StyleParseErrorKind<'i>> for CounterStyleRuleParser<'a, 'b>
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.
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.
Auto Trait Implementations§
impl<'a, 'b> Freeze for CounterStyleRuleParser<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for CounterStyleRuleParser<'a, 'b>
impl<'a, 'b> !Send for CounterStyleRuleParser<'a, 'b>
impl<'a, 'b> !Sync for CounterStyleRuleParser<'a, 'b>
impl<'a, 'b> Unpin for CounterStyleRuleParser<'a, 'b>
impl<'a, 'b> !UnwindSafe for CounterStyleRuleParser<'a, 'b>
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