Enum swc_css_ast::Hue
source · pub enum Hue {
Number(Number),
Angle(Angle),
}
Variants§
Implementations§
source§impl Hue
impl Hue
sourcepub fn as_number(&self) -> Option<&Number>
pub fn as_number(&self) -> Option<&Number>
Returns Some
if self
is a reference of variant Number
, and None
otherwise.
sourcepub fn as_mut_number(&mut self) -> Option<&mut Number>
pub fn as_mut_number(&mut self) -> Option<&mut Number>
Returns Some
if self
is a mutable reference of variant Number
, and None
otherwise.
sourcepub fn expect_number(self) -> Numberwhere
Self: Debug,
pub fn expect_number(self) -> Numberwhere Self: Debug,
sourcepub fn number(self) -> Option<Number>
pub fn number(self) -> Option<Number>
Returns Some
if self
is of variant Number
, and None
otherwise.
sourcepub fn as_angle(&self) -> Option<&Angle>
pub fn as_angle(&self) -> Option<&Angle>
Returns Some
if self
is a reference of variant Angle
, and None
otherwise.
sourcepub fn as_mut_angle(&mut self) -> Option<&mut Angle>
pub fn as_mut_angle(&mut self) -> Option<&mut Angle>
Returns Some
if self
is a mutable reference of variant Angle
, and None
otherwise.
sourcepub fn expect_angle(self) -> Anglewhere
Self: Debug,
pub fn expect_angle(self) -> Anglewhere Self: Debug,
Trait Implementations§
source§impl EqIgnoreSpan for Hue
impl EqIgnoreSpan for Hue
fn eq_ignore_span(&self, other: &Self) -> bool
impl Eq for Hue
impl StructuralEq for Hue
impl StructuralPartialEq for Hue
Auto Trait Implementations§
impl RefUnwindSafe for Hue
impl Send for Hue
impl Sync for Hue
impl Unpin for Hue
impl UnwindSafe for Hue
Blanket Implementations§
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
Mutably borrows from an owned value. Read more