pub enum StyleParseErrorKind<'i> {
Show 28 variants
BadUrlInDeclarationValueBlock(CowRcStr<'i>),
BadStringInDeclarationValueBlock(CowRcStr<'i>),
UnbalancedCloseParenthesisInDeclarationValueBlock,
UnbalancedCloseSquareBracketInDeclarationValueBlock,
UnbalancedCloseCurlyBracketInDeclarationValueBlock,
PropertyDeclarationValueNotExhausted,
UnexpectedDimension(CowRcStr<'i>),
MediaQueryExpectedFeatureName(CowRcStr<'i>),
MediaQueryExpectedFeatureValue,
MediaQueryUnexpectedOperator,
RangedExpressionWithNoValue,
UnexpectedFunction(CowRcStr<'i>),
PropertySyntaxField(PropertySyntaxParseError),
UnexpectedNamespaceRule,
UnexpectedImportRule,
DisallowedImportRule,
UnexpectedCharsetRule,
UnexpectedIdent(CowRcStr<'i>),
UnspecifiedError,
UnexpectedTokenWithinNamespace(Token<'i>),
ValueError(ValueParseErrorKind<'i>),
SelectorError(SelectorParseErrorKind<'i>),
UnknownProperty(CowRcStr<'i>),
ExperimentalProperty,
InvalidColor(CowRcStr<'i>, Token<'i>),
InvalidFilter(CowRcStr<'i>, Token<'i>),
OtherInvalidValue(CowRcStr<'i>),
UnexpectedImportantDeclaration,
}
Expand description
Errors that can be encountered while parsing CSS values.
Variants§
BadUrlInDeclarationValueBlock(CowRcStr<'i>)
A bad URL token in a DVB.
BadStringInDeclarationValueBlock(CowRcStr<'i>)
A bad string token in a DVB.
UnbalancedCloseParenthesisInDeclarationValueBlock
Unexpected closing parenthesis in a DVB.
UnbalancedCloseSquareBracketInDeclarationValueBlock
Unexpected closing bracket in a DVB.
UnbalancedCloseCurlyBracketInDeclarationValueBlock
Unexpected closing curly bracket in a DVB.
PropertyDeclarationValueNotExhausted
A property declaration value had input remaining after successfully parsing.
UnexpectedDimension(CowRcStr<'i>)
An unexpected dimension token was encountered.
MediaQueryExpectedFeatureName(CowRcStr<'i>)
Missing or invalid media feature name.
MediaQueryExpectedFeatureValue
Missing or invalid media feature value.
MediaQueryUnexpectedOperator
A media feature range operator was not expected.
RangedExpressionWithNoValue
min- or max- properties must have a value.
UnexpectedFunction(CowRcStr<'i>)
A function was encountered that was not expected.
PropertySyntaxField(PropertySyntaxParseError)
Error encountered parsing a @property’s syntax
descriptor
UnexpectedNamespaceRule
@namespace must be before any rule but @charset and @import
UnexpectedImportRule
@import must be before any rule but @charset
DisallowedImportRule
@import rules are disallowed in the parser.
UnexpectedCharsetRule
Unexpected @charset rule encountered.
UnexpectedIdent(CowRcStr<'i>)
The @property <custom-property-name>
must start with --
UnspecifiedError
A placeholder for many sources of errors that require more specific variants.
UnexpectedTokenWithinNamespace(Token<'i>)
An unexpected token was found within a namespace rule.
ValueError(ValueParseErrorKind<'i>)
An error was encountered while parsing a property value.
SelectorError(SelectorParseErrorKind<'i>)
An error was encountered while parsing a selector
UnknownProperty(CowRcStr<'i>)
The property declaration was for an unknown property.
ExperimentalProperty
The property declaration was for a disabled experimental property.
InvalidColor(CowRcStr<'i>, Token<'i>)
The property declaration contained an invalid color value.
InvalidFilter(CowRcStr<'i>, Token<'i>)
The property declaration contained an invalid filter value.
OtherInvalidValue(CowRcStr<'i>)
The property declaration contained an invalid value.
UnexpectedImportantDeclaration
!important
declarations are disallowed in @position-try
or keyframes.
Implementations§
source§impl<'i> StyleParseErrorKind<'i>
impl<'i> StyleParseErrorKind<'i>
sourcepub fn new_invalid<S>(name: S, value_error: ParseError<'i>) -> ParseError<'i>
pub fn new_invalid<S>(name: S, value_error: ParseError<'i>) -> ParseError<'i>
Create an InvalidValue parse error
Trait Implementations§
source§impl<'i> Clone for StyleParseErrorKind<'i>
impl<'i> Clone for StyleParseErrorKind<'i>
source§fn clone(&self) -> StyleParseErrorKind<'i>
fn clone(&self) -> StyleParseErrorKind<'i>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'i> Debug for StyleParseErrorKind<'i>
impl<'i> Debug for StyleParseErrorKind<'i>
source§impl<'i> From<SelectorParseErrorKind<'i>> for StyleParseErrorKind<'i>
impl<'i> From<SelectorParseErrorKind<'i>> for StyleParseErrorKind<'i>
source§fn from(this: SelectorParseErrorKind<'i>) -> Self
fn from(this: SelectorParseErrorKind<'i>) -> Self
source§impl<'i> From<ValueParseErrorKind<'i>> for StyleParseErrorKind<'i>
impl<'i> From<ValueParseErrorKind<'i>> for StyleParseErrorKind<'i>
source§fn from(this: ValueParseErrorKind<'i>) -> Self
fn from(this: ValueParseErrorKind<'i>) -> Self
source§impl<'i> PartialEq for StyleParseErrorKind<'i>
impl<'i> PartialEq for StyleParseErrorKind<'i>
source§fn eq(&self, other: &StyleParseErrorKind<'i>) -> bool
fn eq(&self, other: &StyleParseErrorKind<'i>) -> bool
self
and other
values to be equal, and is used
by ==
.