struct NodeStyleParser;Expand description
cssparser declaration parser; turns each declaration into NodeStyle; value keeps its original text and !important goes into priority
Trait Implementations§
Source§impl<'i> AtRuleParser<'i> for NodeStyleParser
impl<'i> AtRuleParser<'i> for NodeStyleParser
Source§fn parse_prelude(
&mut self,
_name: CowRcStr<'i>,
_input: &mut Parser<'i>,
) -> Result<Self::Prelude, ParseError<Self::Error>>
fn parse_prelude( &mut self, _name: CowRcStr<'i>, _input: &mut Parser<'i>, ) -> Result<Self::Prelude, ParseError<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(
&mut self,
prelude: Self::Prelude,
start: &ParserState,
_input: &mut Parser<'i>,
) -> Result<Self::AtRule, ParseError<Self::Error>>
fn parse_block( &mut self, prelude: Self::Prelude, start: &ParserState, _input: &mut Parser<'i>, ) -> Result<Self::AtRule, ParseError<Self::Error>>
Parse the content of a
{ /* ... */ } block for the body of the at-rule. Read moreSource§impl<'i> DeclarationParser<'i> for NodeStyleParser
impl<'i> DeclarationParser<'i> for NodeStyleParser
Source§type Declaration = NodeStyle
type Declaration = NodeStyle
The finished representation of a declaration.
Source§fn parse_value(
&mut self,
name: CowRcStr<'i>,
input: &mut Parser<'i>,
_declaration_start: &ParserState,
) -> Result<NodeStyle, ParseError<()>>
fn parse_value( &mut self, name: CowRcStr<'i>, input: &mut Parser<'i>, _declaration_start: &ParserState, ) -> Result<NodeStyle, ParseError<()>>
Parse the value of a declaration with the given
name. Read moreSource§impl<'i> QualifiedRuleParser<'i> for NodeStyleParser
impl<'i> QualifiedRuleParser<'i> for NodeStyleParser
Source§type QualifiedRule = NodeStyle
type QualifiedRule = NodeStyle
The finished representation of a qualified rule.
Source§fn parse_prelude(
&mut self,
_input: &mut Parser<'i>,
) -> Result<Self::Prelude, ParseError<Self::Error>>
fn parse_prelude( &mut self, _input: &mut Parser<'i>, ) -> Result<Self::Prelude, ParseError<Self::Error>>
Parse the prelude of a qualified rule. For style rules, this is as Selector list. Read more
Source§fn parse_block(
&mut self,
prelude: Self::Prelude,
start: &ParserState,
_input: &mut Parser<'i>,
) -> Result<Self::QualifiedRule, ParseError<Self::Error>>
fn parse_block( &mut self, prelude: Self::Prelude, start: &ParserState, _input: &mut Parser<'i>, ) -> Result<Self::QualifiedRule, ParseError<Self::Error>>
Parse the content of a
{ /* ... */ } block for the body of the qualified rule. Read moreSource§impl<'i> RuleBodyItemParser<'i, NodeStyle, ()> for NodeStyleParser
impl<'i> RuleBodyItemParser<'i, NodeStyle, ()> for NodeStyleParser
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 Freeze for NodeStyleParser
impl RefUnwindSafe for NodeStyleParser
impl Send for NodeStyleParser
impl Sync for NodeStyleParser
impl Unpin for NodeStyleParser
impl UnsafeUnpin for NodeStyleParser
impl UnwindSafe for NodeStyleParser
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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