Enum swc_css_ast::KeyframeSelector
source · [−]pub enum KeyframeSelector {
Ident(Ident),
Percentage(Percentage),
}
Variants
Ident(Ident)
Percentage(Percentage)
Implementations
sourceimpl KeyframeSelector
impl KeyframeSelector
sourcepub fn as_ident(&self) -> Option<&Ident>
pub fn as_ident(&self) -> Option<&Ident>
Returns Some
if self
is a reference of variant Ident
, and None
otherwise.
sourcepub fn as_mut_ident(&mut self) -> Option<&mut Ident>
pub fn as_mut_ident(&mut self) -> Option<&mut Ident>
Returns Some
if self
is a mutable reference of variant Ident
, and None
otherwise.
sourcepub fn expect_ident(self) -> Identwhere
Self: Debug,
pub fn expect_ident(self) -> Identwhere
Self: Debug,
sourcepub fn ident(self) -> Option<Ident>
pub fn ident(self) -> Option<Ident>
Returns Some
if self
is of variant Ident
, and None
otherwise.
sourcepub fn is_percentage(&self) -> bool
pub fn is_percentage(&self) -> bool
Returns true
if self
is of variant Percentage
.
sourcepub fn as_percentage(&self) -> Option<&Percentage>
pub fn as_percentage(&self) -> Option<&Percentage>
Returns Some
if self
is a reference of variant Percentage
, and None
otherwise.
sourcepub fn as_mut_percentage(&mut self) -> Option<&mut Percentage>
pub fn as_mut_percentage(&mut self) -> Option<&mut Percentage>
Returns Some
if self
is a mutable reference of variant Percentage
, and None
otherwise.
sourcepub fn expect_percentage(self) -> Percentagewhere
Self: Debug,
pub fn expect_percentage(self) -> Percentagewhere
Self: Debug,
Unwraps the value, yielding the content of Percentage
.
Panics
Panics if the value is not Percentage
, with a panic message including the content of self
.
sourcepub fn percentage(self) -> Option<Percentage>
pub fn percentage(self) -> Option<Percentage>
Returns Some
if self
is of variant Percentage
, and None
otherwise.
Trait Implementations
sourceimpl Clone for KeyframeSelector
impl Clone for KeyframeSelector
sourcefn clone(&self) -> KeyframeSelector
fn clone(&self) -> KeyframeSelector
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for KeyframeSelector
impl Debug for KeyframeSelector
sourceimpl<'de> Deserialize<'de> for KeyframeSelector
impl<'de> Deserialize<'de> for KeyframeSelector
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl EqIgnoreSpan for KeyframeSelector
impl EqIgnoreSpan for KeyframeSelector
fn eq_ignore_span(&self, other: &Self) -> bool
sourceimpl From<Ident> for KeyframeSelector
impl From<Ident> for KeyframeSelector
sourceimpl From<Percentage> for KeyframeSelector
impl From<Percentage> for KeyframeSelector
sourcefn from(v: Percentage) -> Self
fn from(v: Percentage) -> Self
Converts to this type from the input type.
sourceimpl Hash for KeyframeSelector
impl Hash for KeyframeSelector
sourceimpl PartialEq<KeyframeSelector> for KeyframeSelector
impl PartialEq<KeyframeSelector> for KeyframeSelector
sourcefn eq(&self, other: &KeyframeSelector) -> bool
fn eq(&self, other: &KeyframeSelector) -> bool
sourceimpl Serialize for KeyframeSelector
impl Serialize for KeyframeSelector
sourceimpl Spanned for KeyframeSelector
impl Spanned for KeyframeSelector
impl Eq for KeyframeSelector
impl StructuralEq for KeyframeSelector
impl StructuralPartialEq for KeyframeSelector
Auto Trait Implementations
impl RefUnwindSafe for KeyframeSelector
impl Send for KeyframeSelector
impl Sync for KeyframeSelector
impl Unpin for KeyframeSelector
impl UnwindSafe for KeyframeSelector
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more