Enum swc_css_ast::KeyframesName
source · pub enum KeyframesName {
CustomIdent(Box<CustomIdent>),
Str(Box<Str>),
PseudoPrefix(Box<KeyframesPseudoPrefix>),
PseudoFunction(Box<KeyframesPseudoFunction>),
}
Variants§
CustomIdent(Box<CustomIdent>)
Str(Box<Str>)
PseudoPrefix(Box<KeyframesPseudoPrefix>)
Only for CSS modules
PseudoFunction(Box<KeyframesPseudoFunction>)
Only for CSS modules
Implementations§
source§impl KeyframesName
impl KeyframesName
sourcepub fn is_custom_ident(&self) -> bool
pub fn is_custom_ident(&self) -> bool
Returns true
if self
is of variant CustomIdent
.
sourcepub fn as_custom_ident(&self) -> Option<&Box<CustomIdent>>
pub fn as_custom_ident(&self) -> Option<&Box<CustomIdent>>
Returns Some
if self
is a reference of variant CustomIdent
, and None
otherwise.
sourcepub fn as_mut_custom_ident(&mut self) -> Option<&mut Box<CustomIdent>>
pub fn as_mut_custom_ident(&mut self) -> Option<&mut Box<CustomIdent>>
Returns Some
if self
is a mutable reference of variant CustomIdent
, and None
otherwise.
sourcepub fn expect_custom_ident(self) -> Box<CustomIdent>where
Self: Debug,
pub fn expect_custom_ident(self) -> Box<CustomIdent>where
Self: Debug,
Unwraps the value, yielding the content of CustomIdent
.
Panics
Panics if the value is not CustomIdent
, with a panic message including the content of self
.
sourcepub fn custom_ident(self) -> Option<Box<CustomIdent>>
pub fn custom_ident(self) -> Option<Box<CustomIdent>>
Returns Some
if self
is of variant CustomIdent
, and None
otherwise.
sourcepub fn as_str(&self) -> Option<&Box<Str>>
pub fn as_str(&self) -> Option<&Box<Str>>
Returns Some
if self
is a reference of variant Str
, and None
otherwise.
sourcepub fn as_mut_str(&mut self) -> Option<&mut Box<Str>>
pub fn as_mut_str(&mut self) -> Option<&mut Box<Str>>
Returns Some
if self
is a mutable reference of variant Str
, and None
otherwise.
sourcepub fn expect_str(self) -> Box<Str>where
Self: Debug,
pub fn expect_str(self) -> Box<Str>where
Self: Debug,
sourcepub fn str(self) -> Option<Box<Str>>
pub fn str(self) -> Option<Box<Str>>
Returns Some
if self
is of variant Str
, and None
otherwise.
sourcepub fn is_pseudo_prefix(&self) -> bool
pub fn is_pseudo_prefix(&self) -> bool
Returns true
if self
is of variant PseudoPrefix
.
sourcepub fn as_pseudo_prefix(&self) -> Option<&Box<KeyframesPseudoPrefix>>
pub fn as_pseudo_prefix(&self) -> Option<&Box<KeyframesPseudoPrefix>>
Returns Some
if self
is a reference of variant PseudoPrefix
, and None
otherwise.
sourcepub fn as_mut_pseudo_prefix(
&mut self
) -> Option<&mut Box<KeyframesPseudoPrefix>>
pub fn as_mut_pseudo_prefix(
&mut self
) -> Option<&mut Box<KeyframesPseudoPrefix>>
Returns Some
if self
is a mutable reference of variant PseudoPrefix
, and None
otherwise.
sourcepub fn expect_pseudo_prefix(self) -> Box<KeyframesPseudoPrefix>where
Self: Debug,
pub fn expect_pseudo_prefix(self) -> Box<KeyframesPseudoPrefix>where
Self: Debug,
Unwraps the value, yielding the content of PseudoPrefix
.
Panics
Panics if the value is not PseudoPrefix
, with a panic message including the content of self
.
sourcepub fn pseudo_prefix(self) -> Option<Box<KeyframesPseudoPrefix>>
pub fn pseudo_prefix(self) -> Option<Box<KeyframesPseudoPrefix>>
Returns Some
if self
is of variant PseudoPrefix
, and None
otherwise.
sourcepub fn is_pseudo_function(&self) -> bool
pub fn is_pseudo_function(&self) -> bool
Returns true
if self
is of variant PseudoFunction
.
sourcepub fn as_pseudo_function(&self) -> Option<&Box<KeyframesPseudoFunction>>
pub fn as_pseudo_function(&self) -> Option<&Box<KeyframesPseudoFunction>>
Returns Some
if self
is a reference of variant PseudoFunction
, and None
otherwise.
sourcepub fn as_mut_pseudo_function(
&mut self
) -> Option<&mut Box<KeyframesPseudoFunction>>
pub fn as_mut_pseudo_function(
&mut self
) -> Option<&mut Box<KeyframesPseudoFunction>>
Returns Some
if self
is a mutable reference of variant PseudoFunction
, and None
otherwise.
sourcepub fn expect_pseudo_function(self) -> Box<KeyframesPseudoFunction>where
Self: Debug,
pub fn expect_pseudo_function(self) -> Box<KeyframesPseudoFunction>where
Self: Debug,
Unwraps the value, yielding the content of PseudoFunction
.
Panics
Panics if the value is not PseudoFunction
, with a panic message including the content of self
.
sourcepub fn pseudo_function(self) -> Option<Box<KeyframesPseudoFunction>>
pub fn pseudo_function(self) -> Option<Box<KeyframesPseudoFunction>>
Returns Some
if self
is of variant PseudoFunction
, and None
otherwise.
Trait Implementations§
source§impl Clone for KeyframesName
impl Clone for KeyframesName
source§fn clone(&self) -> KeyframesName
fn clone(&self) -> KeyframesName
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for KeyframesName
impl Debug for KeyframesName
source§impl<'de> Deserialize<'de> for KeyframesName
impl<'de> Deserialize<'de> for KeyframesName
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl EqIgnoreSpan for KeyframesName
impl EqIgnoreSpan for KeyframesName
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<Box<CustomIdent, Global>> for KeyframesName
impl From<Box<CustomIdent, Global>> for KeyframesName
source§fn from(v: Box<CustomIdent>) -> Self
fn from(v: Box<CustomIdent>) -> Self
source§impl From<Box<KeyframesPseudoFunction, Global>> for KeyframesName
impl From<Box<KeyframesPseudoFunction, Global>> for KeyframesName
source§fn from(v: Box<KeyframesPseudoFunction>) -> Self
fn from(v: Box<KeyframesPseudoFunction>) -> Self
source§impl From<Box<KeyframesPseudoPrefix, Global>> for KeyframesName
impl From<Box<KeyframesPseudoPrefix, Global>> for KeyframesName
source§fn from(v: Box<KeyframesPseudoPrefix>) -> Self
fn from(v: Box<KeyframesPseudoPrefix>) -> Self
source§impl From<KeyframesName> for AtRulePrelude
impl From<KeyframesName> for AtRulePrelude
source§fn from(v: KeyframesName) -> Self
fn from(v: KeyframesName) -> Self
source§impl Hash for KeyframesName
impl Hash for KeyframesName
source§impl PartialEq<KeyframesName> for KeyframesName
impl PartialEq<KeyframesName> for KeyframesName
source§fn eq(&self, other: &KeyframesName) -> bool
fn eq(&self, other: &KeyframesName) -> bool
self
and other
values to be equal, and is used
by ==
.