[][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

Implementations

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 Clone for Color[src]

impl Copy for Color[src]

impl Debug for Color[src]

impl PartialEq<Color> for Color[src]

impl StructuralPartialEq for Color[src]

impl ToCss for Color[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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.