pub struct Color<'a> {
pub mode: ColorMode<'a>,
pub upper: bool,
pub android: bool,
pub alpha: bool,
}Fields§
§mode: ColorMode<'a>§upper: bool§android: bool§alpha: boolImplementations§
Source§impl<'a> Color<'a>
impl<'a> Color<'a>
pub fn init(mode: &'a str, upper: bool, android: bool, alpha: bool) -> Self
pub fn new(mode: &'a str) -> Self
pub fn copy(&self, mode: &'a str) -> Self
pub fn to_upper(&mut self, to_upper: bool) -> &Self
pub fn to_android(&mut self, to_android: bool) -> &Self
pub fn to_alpha(&mut self, to_alpha: bool) -> &Self
pub fn to_str(&self) -> &str
pub fn to_rgb(&self) -> Result<String, Error>
pub fn to_hex(&self) -> Result<String, Error>
pub fn to_hsl(&self) -> Result<String, Error>
pub fn to_cmyk(&self) -> Result<String, Error>
pub fn to_hsv(&self) -> Result<String, Error>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Color<'a>
impl<'a> RefUnwindSafe for Color<'a>
impl<'a> Send for Color<'a>
impl<'a> Sync for Color<'a>
impl<'a> Unpin for Color<'a>
impl<'a> UnsafeUnpin for Color<'a>
impl<'a> UnwindSafe for Color<'a>
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