QualifiedRule

Struct QualifiedRule 

Source
pub struct QualifiedRule<'a, P, D, R, M>
where D: DeclarationValue<'a, M>, M: NodeMetadata,
{ pub prelude: P, pub block: Block<'a, D, R, M>, /* private fields */ }

Fields§

§prelude: P§block: Block<'a, D, R, M>

Trait Implementations§

Source§

impl<'a, P: Clone, D, R: Clone, M> Clone for QualifiedRule<'a, P, D, R, M>
where D: DeclarationValue<'a, M> + Clone, M: NodeMetadata + Clone,

Source§

fn clone(&self) -> QualifiedRule<'a, P, D, R, M>

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
Source§

impl<'a, P: Debug, D, R: Debug, M> Debug for QualifiedRule<'a, P, D, R, M>
where D: DeclarationValue<'a, M> + Debug, M: NodeMetadata + Debug,

Source§

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

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

impl<'a, P: Hash, D, R: Hash, M> Hash for QualifiedRule<'a, P, D, R, M>
where D: DeclarationValue<'a, M> + Hash, M: NodeMetadata + Hash,

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a, P, D, R, M> NodeWithMetadata<M> for QualifiedRule<'a, P, D, R, M>
where D: DeclarationValue<'a, M>, M: NodeMetadata,

Source§

fn metadata(&self) -> M

Returns the complete aggregated metadata for this node (self + children)
Source§

fn self_metadata(&self, initial: M) -> M

Returns the metadata contributed by this node itself plus and child meta. Most nodes don’t contribute metadata, so can simply return child. Other nodes may want to alter the metadata; supplying their own modifications to initial.
Source§

impl<'a, P: Ord, D, R: Ord, M> Ord for QualifiedRule<'a, P, D, R, M>
where D: DeclarationValue<'a, M> + Ord, M: NodeMetadata + Ord,

Source§

fn cmp(&self, other: &QualifiedRule<'a, P, D, R, M>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<'a, P, D, R, M> Parse<'a> for QualifiedRule<'a, P, D, R, M>
where D: DeclarationValue<'a, M>, P: Parse<'a>, R: Parse<'a> + NodeWithMetadata<M>, M: NodeMetadata,

A QualifiedRule represents a block with a prelude which may contain other rules. Examples of QualifiedRules are StyleRule, KeyframeRule (no s!).

Source§

fn parse<Iter>(p: &mut Parser<'a, Iter>) -> Result<Self>
where Iter: Iterator<Item = Cursor> + Clone,

Source§

fn try_parse<I>(p: &mut Parser<'a, I>) -> Result<Self>
where I: Iterator<Item = Cursor> + Clone,

Source§

impl<'a, P: PartialEq, D, R: PartialEq, M> PartialEq for QualifiedRule<'a, P, D, R, M>

Source§

fn eq(&self, other: &QualifiedRule<'a, P, D, R, M>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, P: PartialOrd, D, R: PartialOrd, M> PartialOrd for QualifiedRule<'a, P, D, R, M>

Source§

fn partial_cmp(&self, other: &QualifiedRule<'a, P, D, R, M>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, P, D, R, M> Peek<'a> for QualifiedRule<'a, P, D, R, M>
where P: Peek<'a>, D: DeclarationValue<'a, M>, M: NodeMetadata,

Source§

fn peek<Iter>(p: &Parser<'a, Iter>, c: Cursor) -> bool
where Iter: Iterator<Item = Cursor> + Clone,

Source§

const PEEK_KINDSET: KindSet = KindSet::ANY

Source§

impl<'a, P, D, R, M> SemanticEq for QualifiedRule<'a, P, D, R, M>

Source§

fn semantic_eq(&self, other: &Self) -> bool

Returns true if self and other are semantically equal.
Source§

impl<'a, P, D, R, M> ToCursors for QualifiedRule<'a, P, D, R, M>

Source§

fn to_cursors(&self, s: &mut impl CursorSink)

Source§

impl<'a, P, D, R, M> ToSpan for QualifiedRule<'a, P, D, R, M>
where D: DeclarationValue<'a, M> + ToSpan, P: ToSpan, R: ToSpan, M: NodeMetadata,

Source§

fn to_span(&self) -> Span

Source§

impl<'a, P: Eq, D, R: Eq, M> Eq for QualifiedRule<'a, P, D, R, M>
where D: DeclarationValue<'a, M> + Eq, M: NodeMetadata + Eq,

Source§

impl<'a, P, D, R, M> StructuralPartialEq for QualifiedRule<'a, P, D, R, M>
where D: DeclarationValue<'a, M>, M: NodeMetadata,

Auto Trait Implementations§

§

impl<'a, P, D, R, M> Freeze for QualifiedRule<'a, P, D, R, M>
where P: Freeze, M: Freeze,

§

impl<'a, P, D, R, M> !RefUnwindSafe for QualifiedRule<'a, P, D, R, M>

§

impl<'a, P, D, R, M> !Send for QualifiedRule<'a, P, D, R, M>

§

impl<'a, P, D, R, M> !Sync for QualifiedRule<'a, P, D, R, M>

§

impl<'a, P, D, R, M> Unpin for QualifiedRule<'a, P, D, R, M>
where P: Unpin, M: Unpin,

§

impl<'a, P, D, R, M> !UnwindSafe for QualifiedRule<'a, P, D, R, M>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

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

Performs the conversion.