Enum ecolor::hex_color_runtime::HexColor
source · #[repr(C)]pub enum HexColor {
Hex3(Color32),
Hex4(Color32),
Hex6(Color32),
Hex8(Color32),
}
Expand description
Variants§
Hex3(Color32)
3 hexadecimal digits, one for each of the r, g, b channels
Hex4(Color32)
4 hexadecimal digits, one for each of the r, g, b, a channels
Hex6(Color32)
6 hexadecimal digits, two for each of the r, g, b channels
Hex8(Color32)
8 hexadecimal digits, one for each of the r, g, b, a channels
Implementations§
source§impl HexColor
impl HexColor
sourcepub fn from_str_without_hash(s: &str) -> Result<Self, ParseHexColorError>
pub fn from_str_without_hash(s: &str) -> Result<Self, ParseHexColorError>
Parses a string as a hex color without the leading #
character
§Errors
Returns an error if the length of the string does not correspond to one of the standard formats (3, 4, 6, or 8), or if it contains non-hex characters.
Trait Implementations§
impl Copy for HexColor
impl Eq for HexColor
impl StructuralPartialEq for HexColor
Auto Trait Implementations§
impl Freeze for HexColor
impl RefUnwindSafe for HexColor
impl Send for HexColor
impl Sync for HexColor
impl Unpin for HexColor
impl UnwindSafe for HexColor
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)