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 StructuralPartialEq for Hue
Auto Trait Implementations§
impl Freeze for Hue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more