pub struct ColorMatch {
pub name: Option<String>,
pub value: String,
pub rgb: Rgb,
pub distance: f64,
}Expand description
The result of a nearest-color match.
Fields§
§name: Option<String>The matched color’s name, if the palette was named.
value: StringThe matched color’s source string (e.g. #800).
rgb: RgbThe matched color’s RGB value.
distance: f64The Euclidean RGB distance from the needle to the match.
Trait Implementations§
Source§impl Clone for ColorMatch
impl Clone for ColorMatch
Source§fn clone(&self) -> ColorMatch
fn clone(&self) -> ColorMatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ColorMatch
impl Debug for ColorMatch
Source§impl PartialEq for ColorMatch
impl PartialEq for ColorMatch
Source§fn eq(&self, other: &ColorMatch) -> bool
fn eq(&self, other: &ColorMatch) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ColorMatch
Auto Trait Implementations§
impl Freeze for ColorMatch
impl RefUnwindSafe for ColorMatch
impl Send for ColorMatch
impl Sync for ColorMatch
impl Unpin for ColorMatch
impl UnsafeUnpin for ColorMatch
impl UnwindSafe for ColorMatch
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