pub trait ToCss {
// Required method
fn to_css<W>(
&self,
dest: &mut Printer<'_, '_, W>,
) -> Result<(), PrinterError>
where W: Write;
// Provided method
fn to_css_string(
&self,
options: PrinterOptions<'_>,
) -> Result<String, PrinterError> { ... }
}Expand description
Trait for things the can serialize themselves in CSS syntax.
Required Methods§
Provided Methods§
Sourcefn to_css_string(
&self,
options: PrinterOptions<'_>,
) -> Result<String, PrinterError>
fn to_css_string( &self, options: PrinterOptions<'_>, ) -> Result<String, PrinterError>
Serialize self in CSS syntax and return a string.
(This is a convenience wrapper for to_css and probably should not be overridden.)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".