pub struct Parser<I>
where I: ParserInput,
{ /* private fields */ }

Implementations§

source§

impl<I> Parser<I>
where I: ParserInput,

source

pub fn parse_function_values( &mut self, function_name: &FunctionName ) -> PResult<Vec<ComponentValue>>

source§

impl<I> Parser<I>
where I: ParserInput,

source

pub fn new(input: I, config: ParserConfig) -> Self

source

pub fn dump_cur(&mut self) -> String

source

pub fn take_errors(&mut self) -> Vec<Error>

Take recovered errors.

source

pub fn parse_all(&mut self) -> PResult<Stylesheet>

Trait Implementations§

source§

impl<I> Clone for Parser<I>
where I: ParserInput + Clone,

source§

fn clone(&self) -> Parser<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I> Debug for Parser<I>
where I: ParserInput + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> Parse<AbsoluteColorBase> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<AbsoluteColorBase>

source§

impl<I> Parse<AlphaValue> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<AlphaValue>

source§

impl<I> Parse<AnPlusB> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<AnPlusB>

source§

impl<I> Parse<Angle> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Angle>

source§

impl<I> Parse<AtRule> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<AtRule>

source§

impl<I> Parse<AttributeSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<AttributeSelector>

source§

impl<I> Parse<AttributeSelectorMatcher> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<AttributeSelectorMatcher>

source§

impl<I> Parse<AttributeSelectorModifier> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<AttributeSelectorModifier>

source§

impl<I> Parse<AttributeSelectorValue> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<AttributeSelectorValue>

source§

impl<I> Parse<CalcOperator> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CalcOperator>

source§

impl<I> Parse<CalcProduct> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CalcProduct>

source§

impl<I> Parse<CalcSum> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CalcSum>

source§

impl<I> Parse<CalcValue> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CalcValue>

source§

impl<I> Parse<ClassSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ClassSelector>

source§

impl<I> Parse<CmykComponent> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CmykComponent>

source§

impl<I> Parse<Color> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Color>

source§

impl<I> Parse<Combinator> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Combinator>

source§

impl<I> Parse<ComplexSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ComplexSelector>

source§

impl<I> Parse<ComponentValue> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ComponentValue>

source§

impl<I> Parse<CompoundSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CompoundSelector>

source§

impl<I> Parse<CompoundSelectorList> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CompoundSelectorList>

source§

impl<I> Parse<ContainerCondition> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ContainerCondition>

source§

impl<I> Parse<ContainerName> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ContainerName>

source§

impl<I> Parse<ContainerQuery> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ContainerQuery>

source§

impl<I> Parse<ContainerQueryAnd> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ContainerQueryAnd>

source§

impl<I> Parse<ContainerQueryNot> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ContainerQueryNot>

source§

impl<I> Parse<ContainerQueryOr> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ContainerQueryOr>

source§

impl<I> Parse<CustomHighlightName> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CustomHighlightName>

source§

impl<I> Parse<CustomIdent> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CustomIdent>

source§

impl<I> Parse<CustomMediaQuery> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CustomMediaQuery>

source§

impl<I> Parse<CustomPropertyName> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<CustomPropertyName>

source§

impl<I> Parse<DashedIdent> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<DashedIdent>

source§

impl<I> Parse<Declaration> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Declaration>

source§

impl<I> Parse<Delimiter> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Delimiter>

source§

impl<I> Parse<Dimension> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Dimension>

source§

impl<I> Parse<DocumentPreludeMatchingFunction> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<DocumentPreludeMatchingFunction>

source§

impl<I> Parse<ExtensionName> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ExtensionName>

source§

impl<I> Parse<FamilyName> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<FamilyName>

source§

impl<I> Parse<Flex> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Flex>

source§

impl<I> Parse<FontFeatureValuesPrelude> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<FontFeatureValuesPrelude>

source§

impl<I> Parse<ForgivingRelativeSelectorList> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ForgivingRelativeSelectorList>

source§

impl<I> Parse<ForgivingSelectorList> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ForgivingSelectorList>

source§

impl<I> Parse<Frequency> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Frequency>

source§

impl<I> Parse<Function> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Function>

source§

impl<I> Parse<GeneralEnclosed> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<GeneralEnclosed>

source§

impl<I> Parse<HexColor> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<HexColor>

source§

impl<I> Parse<Hue> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Hue>

source§

impl<I> Parse<IdSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<IdSelector>

source§

impl<I> Parse<Ident> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Ident>

source§

impl<I> Parse<ImportConditions> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ImportConditions>

source§

impl<I> Parse<Integer> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Integer>

source§

impl<I> Parse<KeyframeSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<KeyframeSelector>

source§

impl<I> Parse<KeyframesName> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<KeyframesName>

source§

impl<I> Parse<LayerName> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<LayerName>

source§

impl<I> Parse<Length> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Length>

source§

impl<I> Parse<ListOfComponentValues> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ListOfComponentValues>

source§

impl<I> Parse<MediaAnd> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaAnd>

source§

impl<I> Parse<MediaCondition> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaCondition>

source§

impl<I> Parse<MediaConditionWithoutOr> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaConditionWithoutOr>

source§

impl<I> Parse<MediaFeature> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaFeature>

source§

impl<I> Parse<MediaFeatureValue> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaFeatureValue>

source§

impl<I> Parse<MediaInParens> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaInParens>

source§

impl<I> Parse<MediaNot> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaNot>

source§

impl<I> Parse<MediaOr> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaOr>

source§

impl<I> Parse<MediaQuery> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaQuery>

source§

impl<I> Parse<MediaQueryList> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaQueryList>

source§

impl<I> Parse<MediaType> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<MediaType>

source§

impl<I> Parse<NamespacePrefix> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<NamespacePrefix>

source§

impl<I> Parse<Number> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Number>

source§

impl<I> Parse<PageSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<PageSelector>

source§

impl<I> Parse<PageSelectorList> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<PageSelectorList>

source§

impl<I> Parse<PageSelectorPseudo> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<PageSelectorPseudo>

source§

impl<I> Parse<PageSelectorType> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<PageSelectorType>

source§

impl<I> Parse<Percentage> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Percentage>

source§

impl<I> Parse<PseudoClassSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<PseudoClassSelector>

source§

impl<I> Parse<PseudoElementSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<PseudoElementSelector>

source§

impl<I> Parse<QualifiedRule> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<QualifiedRule>

source§

impl<I> Parse<QueryInParens> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<QueryInParens>

source§

impl<I> Parse<RelativeSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<RelativeSelector>

source§

impl<I> Parse<RelativeSelectorList> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<RelativeSelectorList>

source§

impl<I> Parse<Resolution> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Resolution>

source§

impl<I> Parse<ScopeRange> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<ScopeRange>

source§

impl<I> Parse<SelectorList> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SelectorList>

source§

impl<I> Parse<SimpleBlock> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SimpleBlock>

source§

impl<I> Parse<SizeFeature> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SizeFeature>

source§

impl<I> Parse<SizeFeatureValue> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SizeFeatureValue>

source§

impl<I> Parse<Str> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Str>

source§

impl<I> Parse<Stylesheet> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Stylesheet>

source§

impl<I> Parse<SubclassSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SubclassSelector>

source§

impl<I> Parse<SupportsAnd> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SupportsAnd>

source§

impl<I> Parse<SupportsCondition> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SupportsCondition>

source§

impl<I> Parse<SupportsFeature> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SupportsFeature>

source§

impl<I> Parse<SupportsInParens> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SupportsInParens>

source§

impl<I> Parse<SupportsNot> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SupportsNot>

source§

impl<I> Parse<SupportsOr> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<SupportsOr>

source§

impl<I> Parse<Time> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Time>

source§

impl<I> Parse<TypeSelector> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<TypeSelector>

source§

impl<I> Parse<UnicodeRange> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<UnicodeRange>

source§

impl<I> Parse<UnknownDimension> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<UnknownDimension>

source§

impl<I> Parse<Url> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Url>

source§

impl<I> Parse<Vec<DeclarationOrAtRule>> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Vec<DeclarationOrAtRule>>

source§

impl<I> Parse<Vec<Rule>> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Vec<Rule>>

source§

impl<I> Parse<Vec<StyleBlock>> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<Vec<StyleBlock>>

source§

impl<I> Parse<WqName> for Parser<I>
where I: ParserInput,

source§

fn parse(&mut self) -> PResult<WqName>

Auto Trait Implementations§

§

impl<I> RefUnwindSafe for Parser<I>
where I: RefUnwindSafe,

§

impl<I> Send for Parser<I>
where I: Send,

§

impl<I> Sync for Parser<I>
where I: Sync,

§

impl<I> Unpin for Parser<I>
where I: Unpin,

§

impl<I> UnwindSafe for Parser<I>
where I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
source§

impl<T, P> Parse<Box<T>> for P
where P: Parse<T>,

source§

fn parse(&mut self) -> Result<Box<T>, Error>

§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more