pub enum CssParseErrorInner<'a> {
ParseError(CssSyntaxError),
UnclosedBlock,
MalformedCss,
DynamicCssParseError(DynamicCssParseError<'a>),
PseudoSelectorParseError(CssPseudoSelectorParseError<'a>),
NodeTypeTag(NodeTypeTagParseError<'a>),
UnknownPropertyKey(&'a str, &'a str),
VarOnShorthandProperty {
key: CombinedCssPropertyType,
value: &'a str,
},
}Variants§
ParseError(CssSyntaxError)
A hard error in the CSS syntax
UnclosedBlock
Braces are not balanced properly
MalformedCss
Invalid syntax, such as #div { #div: "my-value" }
DynamicCssParseError(DynamicCssParseError<'a>)
Error parsing dynamic CSS property, such as
#div { width: {{ my_id }} /* no default case */ }
PseudoSelectorParseError(CssPseudoSelectorParseError<'a>)
Error while parsing a pseudo selector (like :aldkfja)
NodeTypeTag(NodeTypeTagParseError<'a>)
The path has to be either *, div, p or something like that
UnknownPropertyKey(&'a str, &'a str)
A certain property has an unknown key, for example: alsdfkj: 500px = unknown CSS key "alsdfkj: 500px"
VarOnShorthandProperty
var() can’t be used on properties that expand to multiple values, since they would be
ambiguous and degrade performance - for example margin: var(--blah) would be ambiguous
because it’s not clear when setting the variable, whether all sides should be set,
instead, you have to use margin-top: var(--blah), margin-bottom: var(--baz) in order
to work around this limitation.
Implementations§
Source§impl<'a> CssParseErrorInner<'a>
impl<'a> CssParseErrorInner<'a>
pub fn to_contained(&self) -> CssParseErrorInnerOwned
Trait Implementations§
Source§impl<'a> Clone for CssParseErrorInner<'a>
impl<'a> Clone for CssParseErrorInner<'a>
Source§fn clone(&self) -> CssParseErrorInner<'a>
fn clone(&self) -> CssParseErrorInner<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for CssParseErrorInner<'a>
impl<'a> Debug for CssParseErrorInner<'a>
Source§impl<'a> Display for CssParseErrorInner<'a>
impl<'a> Display for CssParseErrorInner<'a>
Source§impl<'a> From<CssPseudoSelectorParseError<'a>> for CssParseErrorInner<'a>
impl<'a> From<CssPseudoSelectorParseError<'a>> for CssParseErrorInner<'a>
Source§fn from(e: CssPseudoSelectorParseError<'a>) -> Self
fn from(e: CssPseudoSelectorParseError<'a>) -> Self
Source§impl<'a> From<CssSyntaxError> for CssParseErrorInner<'a>
impl<'a> From<CssSyntaxError> for CssParseErrorInner<'a>
Source§fn from(e: CssSyntaxError) -> Self
fn from(e: CssSyntaxError) -> Self
Source§impl<'a> From<DynamicCssParseError<'a>> for CssParseErrorInner<'a>
impl<'a> From<DynamicCssParseError<'a>> for CssParseErrorInner<'a>
Source§fn from(e: DynamicCssParseError<'a>) -> Self
fn from(e: DynamicCssParseError<'a>) -> Self
Source§impl<'a> From<Error> for CssParseErrorInner<'a>
impl<'a> From<Error> for CssParseErrorInner<'a>
Source§fn from(e: SimplecssError) -> Self
fn from(e: SimplecssError) -> Self
Source§impl<'a> From<NodeTypeTagParseError<'a>> for CssParseErrorInner<'a>
impl<'a> From<NodeTypeTagParseError<'a>> for CssParseErrorInner<'a>
Source§fn from(e: NodeTypeTagParseError<'a>) -> Self
fn from(e: NodeTypeTagParseError<'a>) -> Self
Source§impl<'a> PartialEq for CssParseErrorInner<'a>
impl<'a> PartialEq for CssParseErrorInner<'a>
Source§fn eq(&self, other: &CssParseErrorInner<'a>) -> bool
fn eq(&self, other: &CssParseErrorInner<'a>) -> bool
self and other values to be equal, and is used by ==.