[][src]Enum cssparser::Color

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]

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]

Parse a value, per CSS Color Module Level 3.

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]

Parse a value, per CSS Color Module Level 3.

pub fn parse_hash(value: &[u8]) -> Result<Self, ()>[src]

Parse a color hash, without the leading '#' character.

Trait Implementations

impl ToCss for Color[src]

fn to_css_string(&self) -> String[src]

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

impl Clone for Color[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<Color> for Color[src]

impl Copy for Color[src]

impl Debug for Color[src]

Auto Trait Implementations

impl Unpin for Color

impl Send for Color

impl Sync for Color

impl RefUnwindSafe for Color

impl UnwindSafe for Color

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]