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
sourceimpl 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
sourceimpl Clone for KeyframesName
impl Clone for KeyframesName
sourcefn clone(&self) -> KeyframesName
fn clone(&self) -> KeyframesName
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more