Enum swc_css_ast::ContainerQueryType
source · pub enum ContainerQueryType {
Not(ContainerQueryNot),
And(ContainerQueryAnd),
Or(ContainerQueryOr),
QueryInParens(QueryInParens),
}
Variants§
Implementations§
source§impl ContainerQueryType
impl ContainerQueryType
sourcepub fn as_not(&self) -> Option<&ContainerQueryNot>
pub fn as_not(&self) -> Option<&ContainerQueryNot>
Returns Some
if self
is a reference of variant Not
, and None
otherwise.
sourcepub fn as_mut_not(&mut self) -> Option<&mut ContainerQueryNot>
pub fn as_mut_not(&mut self) -> Option<&mut ContainerQueryNot>
Returns Some
if self
is a mutable reference of variant Not
, and None
otherwise.
sourcepub fn expect_not(self) -> ContainerQueryNotwhere
Self: Debug,
pub fn expect_not(self) -> ContainerQueryNotwhere Self: Debug,
sourcepub fn not(self) -> Option<ContainerQueryNot>
pub fn not(self) -> Option<ContainerQueryNot>
Returns Some
if self
is of variant Not
, and None
otherwise.
sourcepub fn as_and(&self) -> Option<&ContainerQueryAnd>
pub fn as_and(&self) -> Option<&ContainerQueryAnd>
Returns Some
if self
is a reference of variant And
, and None
otherwise.
sourcepub fn as_mut_and(&mut self) -> Option<&mut ContainerQueryAnd>
pub fn as_mut_and(&mut self) -> Option<&mut ContainerQueryAnd>
Returns Some
if self
is a mutable reference of variant And
, and None
otherwise.
sourcepub fn expect_and(self) -> ContainerQueryAndwhere
Self: Debug,
pub fn expect_and(self) -> ContainerQueryAndwhere Self: Debug,
sourcepub fn and(self) -> Option<ContainerQueryAnd>
pub fn and(self) -> Option<ContainerQueryAnd>
Returns Some
if self
is of variant And
, and None
otherwise.
sourcepub fn as_or(&self) -> Option<&ContainerQueryOr>
pub fn as_or(&self) -> Option<&ContainerQueryOr>
Returns Some
if self
is a reference of variant Or
, and None
otherwise.
sourcepub fn as_mut_or(&mut self) -> Option<&mut ContainerQueryOr>
pub fn as_mut_or(&mut self) -> Option<&mut ContainerQueryOr>
Returns Some
if self
is a mutable reference of variant Or
, and None
otherwise.
sourcepub fn expect_or(self) -> ContainerQueryOrwhere
Self: Debug,
pub fn expect_or(self) -> ContainerQueryOrwhere Self: Debug,
sourcepub fn or(self) -> Option<ContainerQueryOr>
pub fn or(self) -> Option<ContainerQueryOr>
Returns Some
if self
is of variant Or
, and None
otherwise.
sourcepub const fn is_query_in_parens(&self) -> bool
pub const fn is_query_in_parens(&self) -> bool
Returns true
if self
is of variant QueryInParens
.
sourcepub fn as_query_in_parens(&self) -> Option<&QueryInParens>
pub fn as_query_in_parens(&self) -> Option<&QueryInParens>
Returns Some
if self
is a reference of variant QueryInParens
, and None
otherwise.
sourcepub fn as_mut_query_in_parens(&mut self) -> Option<&mut QueryInParens>
pub fn as_mut_query_in_parens(&mut self) -> Option<&mut QueryInParens>
Returns Some
if self
is a mutable reference of variant QueryInParens
, and None
otherwise.
sourcepub fn expect_query_in_parens(self) -> QueryInParenswhere
Self: Debug,
pub fn expect_query_in_parens(self) -> QueryInParenswhere Self: Debug,
Unwraps the value, yielding the content of QueryInParens
.
Panics
Panics if the value is not QueryInParens
, with a panic message including the content of self
.
sourcepub fn query_in_parens(self) -> Option<QueryInParens>
pub fn query_in_parens(self) -> Option<QueryInParens>
Returns Some
if self
is of variant QueryInParens
, and None
otherwise.
Trait Implementations§
source§impl Clone for ContainerQueryType
impl Clone for ContainerQueryType
source§fn clone(&self) -> ContainerQueryType
fn clone(&self) -> ContainerQueryType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ContainerQueryType
impl Debug for ContainerQueryType
source§impl EqIgnoreSpan for ContainerQueryType
impl EqIgnoreSpan for ContainerQueryType
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<ContainerQueryAnd> for ContainerQueryType
impl From<ContainerQueryAnd> for ContainerQueryType
source§fn from(v: ContainerQueryAnd) -> Self
fn from(v: ContainerQueryAnd) -> Self
source§impl From<ContainerQueryNot> for ContainerQueryType
impl From<ContainerQueryNot> for ContainerQueryType
source§fn from(v: ContainerQueryNot) -> Self
fn from(v: ContainerQueryNot) -> Self
source§impl From<ContainerQueryOr> for ContainerQueryType
impl From<ContainerQueryOr> for ContainerQueryType
source§fn from(v: ContainerQueryOr) -> Self
fn from(v: ContainerQueryOr) -> Self
source§impl From<QueryInParens> for ContainerQueryType
impl From<QueryInParens> for ContainerQueryType
source§fn from(v: QueryInParens) -> Self
fn from(v: QueryInParens) -> Self
source§impl Hash for ContainerQueryType
impl Hash for ContainerQueryType
source§impl PartialEq<ContainerQueryType> for ContainerQueryType
impl PartialEq<ContainerQueryType> for ContainerQueryType
source§fn eq(&self, other: &ContainerQueryType) -> bool
fn eq(&self, other: &ContainerQueryType) -> bool
self
and other
values to be equal, and is used
by ==
.