Enum cssparser::Color [] [src]

pub enum Color {
    CurrentColor,
    RGBA(RGBA),
}

A value.

Variants

CurrentColor

The 'currentColor' keyword

RGBA(RGBA)

Everything else gets converted to RGBA during parsing

Methods

impl Color
[src]

fn parse(input: &mut Parser) -> Result<Color()>

Parse a value, per CSS Color Module Level 3.

FIXME(#2) Deprecated CSS2 System Colors are not supported yet.

Trait Implementations

impl Debug for Color
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl PartialEq for Color
[src]

fn eq(&self, __arg_0: &Color) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Color) -> bool

This method tests for !=.

impl Copy for Color
[src]

impl Clone for Color
[src]

fn clone(&self) -> Color

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl ToCss for Color
[src]

fn to_css<W>(&self, dest: &mut W) -> Result where W: Write

Serialize self in CSS syntax, writing to dest.

fn to_css_string(&self) -> String

Serialize self in CSS syntax and return a string. Read more

fn fmt_to_css<W>(&self, dest: &mut W) -> Result where W: Write

Serialize self in CSS syntax and return a result compatible with std::fmt::Show. Read more