Enum cssparser::Color
[−]
[src]
pub enum Color {
CurrentColor,
RGBA(RGBA),
}A
Variants
CurrentColorThe 'currentcolor' keyword
RGBA(RGBA)Everything else gets converted to RGBA during parsing
Methods
impl Color[src]
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>, [src]
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.
pub fn parse<'i, 't>(
input: &mut Parser<'i, 't>
) -> Result<Color, BasicParseError<'i>>[src]
input: &mut Parser<'i, 't>
) -> Result<Color, BasicParseError<'i>>
Parse a
pub fn parse_hash(value: &[u8]) -> Result<Self, ()>[src]
Parse a color hash, without the leading '#' character.
Trait Implementations
impl Clone for Color[src]
fn clone(&self) -> Color[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Copy for Color[src]
impl PartialEq for Color[src]
fn eq(&self, __arg_0: &Color) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Color) -> bool[src]
This method tests for !=.
impl Debug for Color[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more