pub enum Rule {
QualifiedRule(Box<QualifiedRule>),
AtRule(Box<AtRule>),
ListOfComponentValues(Box<ListOfComponentValues>),
}
Variants§
QualifiedRule(Box<QualifiedRule>)
AtRule(Box<AtRule>)
ListOfComponentValues(Box<ListOfComponentValues>)
Implementations§
Source§impl Rule
impl Rule
Sourcepub const fn is_qualified_rule(&self) -> bool
pub const fn is_qualified_rule(&self) -> bool
Returns true
if self
is of variant QualifiedRule
.
Sourcepub fn as_qualified_rule(&self) -> Option<&Box<QualifiedRule>>
pub fn as_qualified_rule(&self) -> Option<&Box<QualifiedRule>>
Returns Some
if self
is a reference of variant QualifiedRule
, and None
otherwise.
Sourcepub fn as_mut_qualified_rule(&mut self) -> Option<&mut Box<QualifiedRule>>
pub fn as_mut_qualified_rule(&mut self) -> Option<&mut Box<QualifiedRule>>
Returns Some
if self
is a mutable reference of variant QualifiedRule
, and None
otherwise.
Sourcepub fn expect_qualified_rule(self) -> Box<QualifiedRule>where
Self: Debug,
pub fn expect_qualified_rule(self) -> Box<QualifiedRule>where
Self: Debug,
Unwraps the value, yielding the content of QualifiedRule
.
§Panics
Panics if the value is not QualifiedRule
, with a panic message including the content of self
.
Sourcepub fn qualified_rule(self) -> Option<Box<QualifiedRule>>
pub fn qualified_rule(self) -> Option<Box<QualifiedRule>>
Returns Some
if self
is of variant QualifiedRule
, and None
otherwise.
Sourcepub const fn is_at_rule(&self) -> bool
pub const fn is_at_rule(&self) -> bool
Returns true
if self
is of variant AtRule
.
Sourcepub fn as_at_rule(&self) -> Option<&Box<AtRule>>
pub fn as_at_rule(&self) -> Option<&Box<AtRule>>
Returns Some
if self
is a reference of variant AtRule
, and None
otherwise.
Sourcepub fn as_mut_at_rule(&mut self) -> Option<&mut Box<AtRule>>
pub fn as_mut_at_rule(&mut self) -> Option<&mut Box<AtRule>>
Returns Some
if self
is a mutable reference of variant AtRule
, and None
otherwise.
Sourcepub fn expect_at_rule(self) -> Box<AtRule>where
Self: Debug,
pub fn expect_at_rule(self) -> Box<AtRule>where
Self: Debug,
Sourcepub fn at_rule(self) -> Option<Box<AtRule>>
pub fn at_rule(self) -> Option<Box<AtRule>>
Returns Some
if self
is of variant AtRule
, and None
otherwise.
Sourcepub const fn is_list_of_component_values(&self) -> bool
pub const fn is_list_of_component_values(&self) -> bool
Returns true
if self
is of variant ListOfComponentValues
.
Sourcepub fn as_list_of_component_values(&self) -> Option<&Box<ListOfComponentValues>>
pub fn as_list_of_component_values(&self) -> Option<&Box<ListOfComponentValues>>
Returns Some
if self
is a reference of variant ListOfComponentValues
, and None
otherwise.
Sourcepub fn as_mut_list_of_component_values(
&mut self,
) -> Option<&mut Box<ListOfComponentValues>>
pub fn as_mut_list_of_component_values( &mut self, ) -> Option<&mut Box<ListOfComponentValues>>
Returns Some
if self
is a mutable reference of variant ListOfComponentValues
, and None
otherwise.
Sourcepub fn expect_list_of_component_values(self) -> Box<ListOfComponentValues>where
Self: Debug,
pub fn expect_list_of_component_values(self) -> Box<ListOfComponentValues>where
Self: Debug,
Unwraps the value, yielding the content of ListOfComponentValues
.
§Panics
Panics if the value is not ListOfComponentValues
, with a panic message including the content of self
.
Sourcepub fn list_of_component_values(self) -> Option<Box<ListOfComponentValues>>
pub fn list_of_component_values(self) -> Option<Box<ListOfComponentValues>>
Returns Some
if self
is of variant ListOfComponentValues
, and None
otherwise.
Trait Implementations§
Source§impl EqIgnoreSpan for Rule
impl EqIgnoreSpan for Rule
fn eq_ignore_span(&self, other: &Self) -> bool
Source§impl From<Box<ListOfComponentValues>> for Rule
impl From<Box<ListOfComponentValues>> for Rule
Source§fn from(v: Box<ListOfComponentValues>) -> Self
fn from(v: Box<ListOfComponentValues>) -> Self
Source§impl From<Box<QualifiedRule>> for Rule
impl From<Box<QualifiedRule>> for Rule
Source§fn from(v: Box<QualifiedRule>) -> Self
fn from(v: Box<QualifiedRule>) -> Self
Source§impl From<Rule> for ComponentValue
impl From<Rule> for ComponentValue
impl Eq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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