Struct Parser

Source
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§

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§

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

Source§

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

Source§

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

Source§

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

Source§

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

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§

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

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§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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§

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

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§

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

Source§

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

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§

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§

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§

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

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§

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§

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

Source§

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

Source§

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

Source§

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

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§

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§

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§

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

Source§

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

Source§

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

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§

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

Source§

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

Source§

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

Source§

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

Source§

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

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§

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

Source§

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

Source§

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

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§

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

Source§

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

Source§

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

Source§

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

Source§

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

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§

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

Source§

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

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§

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> Freeze for Parser<I>
where I: Freeze,

§

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
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
Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

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

Source§

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

Source§

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>,

Source§

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>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T

Source§

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

Source§

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