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 const fn is_custom_ident(&self) -> bool
pub const 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 const fn is_pseudo_prefix(&self) -> bool
pub const 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 const fn is_pseudo_function(&self) -> bool
pub const 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 EqIgnoreSpan for KeyframesName
impl EqIgnoreSpan for KeyframesName
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<Box<CustomIdent>> for KeyframesName
impl From<Box<CustomIdent>> for KeyframesName
source§fn from(v: Box<CustomIdent>) -> Self
fn from(v: Box<CustomIdent>) -> Self
source§impl From<Box<KeyframesPseudoFunction>> for KeyframesName
impl From<Box<KeyframesPseudoFunction>> for KeyframesName
source§fn from(v: Box<KeyframesPseudoFunction>) -> Self
fn from(v: Box<KeyframesPseudoFunction>) -> Self
source§impl From<Box<KeyframesPseudoPrefix>> for KeyframesName
impl From<Box<KeyframesPseudoPrefix>> 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 for KeyframesName
impl PartialEq 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 ==
.source§impl Spanned for KeyframesName
impl Spanned for KeyframesName
impl Eq for KeyframesName
impl StructuralEq for KeyframesName
impl StructuralPartialEq for KeyframesName
Auto Trait Implementations§
impl RefUnwindSafe for KeyframesName
impl Send for KeyframesName
impl Sync for KeyframesName
impl Unpin for KeyframesName
impl UnwindSafe for KeyframesName
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere T: Hash + ?Sized,
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.