pub struct ColorSet {
pub normal: Option<Color>,
pub hover: Option<Color>,
pub error: Option<Color>,
pub disabled: Option<Color>,
}
Fields§
§normal: Option<Color>
§hover: Option<Color>
§error: Option<Color>
§disabled: Option<Color>
Implementations§
Source§impl ColorSet
impl ColorSet
pub fn new( normal: Option<Color>, hover: Option<Color>, error: Option<Color>, disabled: Option<Color>, ) -> Self
pub fn new_values( normal: Color, hover: Color, error: Color, disabled: Color, ) -> Self
pub fn new_same(color: Color) -> Self
pub fn get(&self, hovering: bool, error: bool, disabled: bool) -> Option<Color>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ColorSet
impl<'de> Deserialize<'de> for ColorSet
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ColorSet
impl StructuralPartialEq for ColorSet
Auto Trait Implementations§
impl Freeze for ColorSet
impl RefUnwindSafe for ColorSet
impl Send for ColorSet
impl Sync for ColorSet
impl Unpin for ColorSet
impl UnwindSafe for ColorSet
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.