Trait cssparser::ToCss

source ·
pub trait ToCss {
    // Required method
    fn to_css<W>(&self, dest: &mut W) -> Result
       where W: Write;

    // Provided method
    fn to_css_string(&self) -> String { ... }
}
Expand description

Trait for things the can serialize themselves in CSS syntax.

Required Methods§

source

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

Serialize self in CSS syntax, writing to dest.

Provided Methods§

source

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.)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ToCss for f32

source§

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

source§

impl ToCss for f64

source§

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

source§

impl ToCss for i8

source§

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

source§

impl ToCss for i16

source§

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

source§

impl ToCss for i32

source§

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

source§

impl ToCss for i64

source§

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

source§

impl ToCss for u8

source§

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

source§

impl ToCss for u16

source§

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

source§

impl ToCss for u32

source§

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

source§

impl ToCss for u64

source§

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

Implementors§