Enum swc_css_ast::QueryInParens
source · [−]pub enum QueryInParens {
ContainerQuery(Box<ContainerQuery>),
SizeFeature(SizeFeature),
GeneralEnclosed(GeneralEnclosed),
}
Variants
ContainerQuery(Box<ContainerQuery>)
SizeFeature(SizeFeature)
GeneralEnclosed(GeneralEnclosed)
Implementations
sourceimpl QueryInParens
impl QueryInParens
sourcepub fn is_container_query(&self) -> bool
pub fn is_container_query(&self) -> bool
Returns true
if self
is of variant ContainerQuery
.
sourcepub fn as_container_query(&self) -> Option<&Box<ContainerQuery>>
pub fn as_container_query(&self) -> Option<&Box<ContainerQuery>>
Returns Some
if self
is a reference of variant ContainerQuery
, and None
otherwise.
sourcepub fn as_mut_container_query(&mut self) -> Option<&mut Box<ContainerQuery>>
pub fn as_mut_container_query(&mut self) -> Option<&mut Box<ContainerQuery>>
Returns Some
if self
is a mutable reference of variant ContainerQuery
, and None
otherwise.
sourcepub fn expect_container_query(self) -> Box<ContainerQuery>where
Self: Debug,
pub fn expect_container_query(self) -> Box<ContainerQuery>where
Self: Debug,
Unwraps the value, yielding the content of ContainerQuery
.
Panics
Panics if the value is not ContainerQuery
, with a panic message including the content of self
.
sourcepub fn container_query(self) -> Option<Box<ContainerQuery>>
pub fn container_query(self) -> Option<Box<ContainerQuery>>
Returns Some
if self
is of variant ContainerQuery
, and None
otherwise.
sourcepub fn is_size_feature(&self) -> bool
pub fn is_size_feature(&self) -> bool
Returns true
if self
is of variant SizeFeature
.
sourcepub fn as_size_feature(&self) -> Option<&SizeFeature>
pub fn as_size_feature(&self) -> Option<&SizeFeature>
Returns Some
if self
is a reference of variant SizeFeature
, and None
otherwise.
sourcepub fn as_mut_size_feature(&mut self) -> Option<&mut SizeFeature>
pub fn as_mut_size_feature(&mut self) -> Option<&mut SizeFeature>
Returns Some
if self
is a mutable reference of variant SizeFeature
, and None
otherwise.
sourcepub fn expect_size_feature(self) -> SizeFeaturewhere
Self: Debug,
pub fn expect_size_feature(self) -> SizeFeaturewhere
Self: Debug,
Unwraps the value, yielding the content of SizeFeature
.
Panics
Panics if the value is not SizeFeature
, with a panic message including the content of self
.
sourcepub fn size_feature(self) -> Option<SizeFeature>
pub fn size_feature(self) -> Option<SizeFeature>
Returns Some
if self
is of variant SizeFeature
, and None
otherwise.
sourcepub fn is_general_enclosed(&self) -> bool
pub fn is_general_enclosed(&self) -> bool
Returns true
if self
is of variant GeneralEnclosed
.
sourcepub fn as_general_enclosed(&self) -> Option<&GeneralEnclosed>
pub fn as_general_enclosed(&self) -> Option<&GeneralEnclosed>
Returns Some
if self
is a reference of variant GeneralEnclosed
, and None
otherwise.
sourcepub fn as_mut_general_enclosed(&mut self) -> Option<&mut GeneralEnclosed>
pub fn as_mut_general_enclosed(&mut self) -> Option<&mut GeneralEnclosed>
Returns Some
if self
is a mutable reference of variant GeneralEnclosed
, and None
otherwise.
sourcepub fn expect_general_enclosed(self) -> GeneralEnclosedwhere
Self: Debug,
pub fn expect_general_enclosed(self) -> GeneralEnclosedwhere
Self: Debug,
Unwraps the value, yielding the content of GeneralEnclosed
.
Panics
Panics if the value is not GeneralEnclosed
, with a panic message including the content of self
.
sourcepub fn general_enclosed(self) -> Option<GeneralEnclosed>
pub fn general_enclosed(self) -> Option<GeneralEnclosed>
Returns Some
if self
is of variant GeneralEnclosed
, and None
otherwise.
Trait Implementations
sourceimpl Clone for QueryInParens
impl Clone for QueryInParens
sourcefn clone(&self) -> QueryInParens
fn clone(&self) -> QueryInParens
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more