pub enum BasicParseErrorKind {
UnexpectedToken,
EndOfInput,
AtRuleInvalid,
AtRuleBodyInvalid,
QualifiedRuleInvalid,
TooManyNestedBlocks,
}Expand description
Details about a BasicParseError
Variants§
UnexpectedToken
An unexpected token was encountered.
The token itself is deliberately not stored: it made this enum 32 bytes,
which pushed Result<&Token, BasicParseError> (returned from every token
fetch) to 40 bytes and therefore out of registers and into memory.
Callers that want to name the token can recover it from the source text
they already carry for the error message.
EndOfInput
The end of the input was encountered unexpectedly.
AtRuleInvalid
An @ rule was encountered that was invalid. See UnexpectedToken for
why the rule name is not stored.
AtRuleBodyInvalid
The body of an ‘@’ rule was invalid.
QualifiedRuleInvalid
A qualified rule was encountered that was invalid.
TooManyNestedBlocks
We’ve gone over the nesting limit.
Trait Implementations§
Source§impl Clone for BasicParseErrorKind
impl Clone for BasicParseErrorKind
Source§fn clone(&self) -> BasicParseErrorKind
fn clone(&self) -> BasicParseErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BasicParseErrorKind
impl Debug for BasicParseErrorKind
Source§impl Display for BasicParseErrorKind
impl Display for BasicParseErrorKind
Source§impl PartialEq for BasicParseErrorKind
impl PartialEq for BasicParseErrorKind
Source§fn eq(&self, other: &BasicParseErrorKind) -> bool
fn eq(&self, other: &BasicParseErrorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BasicParseErrorKind
Auto Trait Implementations§
impl Freeze for BasicParseErrorKind
impl RefUnwindSafe for BasicParseErrorKind
impl Send for BasicParseErrorKind
impl Sync for BasicParseErrorKind
impl Unpin for BasicParseErrorKind
impl UnsafeUnpin for BasicParseErrorKind
impl UnwindSafe for BasicParseErrorKind
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