pub struct ColorIndex(/* private fields */);Implementations§
Source§impl ColorIndex
impl ColorIndex
Sourcepub const fn new(value: f64) -> Result<Self, MagnitudeError>
pub const fn new(value: f64) -> Result<Self, MagnitudeError>
Creates a color index from a finite numeric value.
§Errors
Returns MagnitudeError::NonFiniteColorIndex when value is not finite.
pub const fn value(self) -> f64
Trait Implementations§
Source§impl Clone for ColorIndex
impl Clone for ColorIndex
Source§fn clone(&self) -> ColorIndex
fn clone(&self) -> ColorIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColorIndex
impl Debug for ColorIndex
Source§impl Display for ColorIndex
impl Display for ColorIndex
Source§impl PartialEq for ColorIndex
impl PartialEq for ColorIndex
Source§impl PartialOrd for ColorIndex
impl PartialOrd for ColorIndex
impl Copy for ColorIndex
impl StructuralPartialEq for ColorIndex
Auto Trait Implementations§
impl Freeze for ColorIndex
impl RefUnwindSafe for ColorIndex
impl Send for ColorIndex
impl Sync for ColorIndex
impl Unpin for ColorIndex
impl UnsafeUnpin for ColorIndex
impl UnwindSafe for ColorIndex
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