pub enum Color {
CurrentColor,
RGBA(RGBA),
}
Expand description
A
Variants§
CurrentColor
The ‘currentcolor’ keyword
RGBA(RGBA)
Everything else gets converted to RGBA during parsing
Implementations§
source§impl Color
impl Color
sourcepub fn parse_with<'i, 't, ComponentParser>(
component_parser: &ComponentParser,
input: &mut Parser<'i, 't>,
) -> Result<Color, ParseError<'i, ComponentParser::Error>>where
ComponentParser: ColorComponentParser<'i>,
pub fn parse_with<'i, 't, ComponentParser>(
component_parser: &ComponentParser,
input: &mut Parser<'i, 't>,
) -> Result<Color, ParseError<'i, ComponentParser::Error>>where
ComponentParser: ColorComponentParser<'i>,
Parse a
FIXME(#2) Deprecated CSS2 System Colors are not supported yet.
sourcepub fn parse<'i, 't>(
input: &mut Parser<'i, 't>,
) -> Result<Color, BasicParseError<'i>>
pub fn parse<'i, 't>( input: &mut Parser<'i, 't>, ) -> Result<Color, BasicParseError<'i>>
Parse a
sourcepub fn parse_hash(value: &[u8]) -> Result<Self, ()>
pub fn parse_hash(value: &[u8]) -> Result<Self, ()>
Parse a color hash, without the leading ‘#’ character.
Trait Implementations§
impl Copy for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
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
)