Trait cssparser::ToCss 
                   
                       [−]
                   
               [src]
pub trait ToCss {
    fn to_css<W>(&self, dest: &mut W) -> Result where W: Write;
    fn to_css_string(&self) -> String { ... }
    fn fmt_to_css<W>(&self, dest: &mut W) -> Result where W: Write { ... }
}Trait for things the can serialize themselves in CSS syntax.
Required Methods
fn to_css<W>(&self, dest: &mut W) -> Result where W: Write
Serialize self in CSS syntax, writing to dest.
Provided Methods
fn to_css_string(&self) -> String
Serialize self in CSS syntax and return a string.
(This is a convenience wrapper for to_css and probably should not be overridden.)
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.
Typical usage is, for a Foo that implements ToCss:
use std::fmt; impl fmt::Show for Foo { #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) } }
(This is a convenience wrapper for to_css and probably should not be overridden.)
Implementors
- impl ToCss for RGBA
- impl ToCss for Color
- impl<'a> ToCss for Token<'a>
- impl<'a> ToCss for f32
- impl<'a> ToCss for f64
- impl<'a> ToCss for i8
- impl<'a> ToCss for u8
- impl<'a> ToCss for i16
- impl<'a> ToCss for u16
- impl<'a> ToCss for i32
- impl<'a> ToCss for u32
- impl<'a> ToCss for i64
- impl<'a> ToCss for u64
- impl ToCss for UnicodeRange