Enum style_traits::StyleParseErrorKind
[−]
[src]
pub enum StyleParseErrorKind<'i> {
BadUrlInDeclarationValueBlock(CowRcStr<'i>),
BadStringInDeclarationValueBlock(CowRcStr<'i>),
UnbalancedCloseParenthesisInDeclarationValueBlock,
UnbalancedCloseSquareBracketInDeclarationValueBlock,
UnbalancedCloseCurlyBracketInDeclarationValueBlock,
PropertyDeclarationValueNotExhausted,
UnexpectedDimension(CowRcStr<'i>),
ExpectedIdentifier(Token<'i>),
MediaQueryExpectedFeatureName(CowRcStr<'i>),
MediaQueryExpectedFeatureValue,
RangedExpressionWithNoValue,
UnexpectedFunction(CowRcStr<'i>),
UnexpectedNamespaceRule,
UnexpectedImportRule,
UnexpectedCharsetRule,
UnsupportedAtRule(CowRcStr<'i>),
UnspecifiedError,
UnexpectedTokenWithinNamespace(Token<'i>),
ValueError(ValueParseErrorKind<'i>),
SelectorError(SelectorParseErrorKind<'i>),
UnknownProperty(CowRcStr<'i>),
UnknownVendorProperty,
ExperimentalProperty,
InvalidColor(CowRcStr<'i>, Token<'i>),
InvalidFilter(CowRcStr<'i>, Token<'i>),
OtherInvalidValue(CowRcStr<'i>),
AnimationPropertyInKeyframeBlock,
NotAllowedInPageRule,
}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.
UnbalancedCloseParenthesisInDeclarationValueBlockUnexpected closing parenthesis in a DVB.
UnbalancedCloseSquareBracketInDeclarationValueBlockUnexpected closing bracket in a DVB.
UnbalancedCloseCurlyBracketInDeclarationValueBlockUnexpected closing curly bracket in a DVB.
PropertyDeclarationValueNotExhaustedA property declaration value had input remaining after successfully parsing.
UnexpectedDimension(CowRcStr<'i>)An unexpected dimension token was encountered.
ExpectedIdentifier(Token<'i>)Expected identifier not found.
MediaQueryExpectedFeatureName(CowRcStr<'i>)Missing or invalid media feature name.
MediaQueryExpectedFeatureValueMissing or invalid media feature value.
RangedExpressionWithNoValuemin- or max- properties must have a value.
UnexpectedFunction(CowRcStr<'i>)A function was encountered that was not expected.
UnexpectedNamespaceRule@namespace must be before any rule but @charset and @import
UnexpectedImportRule@import must be before any rule but @charset
UnexpectedCharsetRuleUnexpected @charset rule encountered.
UnsupportedAtRule(CowRcStr<'i>)Unsupported @ rule
UnspecifiedErrorA 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.
UnknownVendorPropertyAn unknown vendor-specific identifier was encountered.
ExperimentalPropertyThe 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.
AnimationPropertyInKeyframeBlockThe declaration contained an animation property, and we were parsing this as a keyframe block (so that property should be ignored).
NotAllowedInPageRuleThe property is not allowed within a page rule.
Methods
impl<'i> StyleParseErrorKind<'i>[src]
pub fn new_invalid(
name: CowRcStr<'i>,
value_error: ParseError<'i>
) -> ParseError<'i>[src]
name: CowRcStr<'i>,
value_error: ParseError<'i>
) -> ParseError<'i>
Create an InvalidValue parse error
Trait Implementations
impl<'i> Clone for StyleParseErrorKind<'i>[src]
fn clone(&self) -> StyleParseErrorKind<'i>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<'i> Debug for StyleParseErrorKind<'i>[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<'i> PartialEq for StyleParseErrorKind<'i>[src]
fn eq(&self, __arg_0: &StyleParseErrorKind<'i>) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &StyleParseErrorKind<'i>) -> bool[src]
This method tests for !=.
impl<'i> From<ValueParseErrorKind<'i>> for StyleParseErrorKind<'i>[src]
fn from(this: ValueParseErrorKind<'i>) -> Self[src]
Performs the conversion.
impl<'i> From<SelectorParseErrorKind<'i>> for StyleParseErrorKind<'i>[src]
fn from(this: SelectorParseErrorKind<'i>) -> Self[src]
Performs the conversion.