swc_core::css::codegen::writer

Trait CssWriter

source
pub trait CssWriter {
    // Required methods
    fn write_space(&mut self) -> Result<(), Error>;
    fn write_newline(&mut self) -> Result<(), Error>;
    fn write_raw(&mut self, span: Option<Span>, text: &str) -> Result<(), Error>;
    fn write_str(&mut self, span: Span, s: &str) -> Result<(), Error>;
    fn increase_indent(&mut self);
    fn decrease_indent(&mut self);
}
Available on crate features __css and css_codegen only.

Required Methods§

source

fn write_space(&mut self) -> Result<(), Error>

source

fn write_newline(&mut self) -> Result<(), Error>

source

fn write_raw(&mut self, span: Option<Span>, text: &str) -> Result<(), Error>

source

fn write_str(&mut self, span: Span, s: &str) -> Result<(), Error>

source

fn increase_indent(&mut self)

source

fn decrease_indent(&mut self)

Implementations on Foreign Types§

source§

impl<'a, T> CssWriter for &'a mut T
where T: 'a + CssWriter + ?Sized,

source§

fn write_space(&mut self) -> Result<(), Error>

source§

fn write_newline(&mut self) -> Result<(), Error>

source§

fn write_raw(&mut self, span: Option<Span>, text: &str) -> Result<(), Error>

source§

fn write_str(&mut self, span: Span, s: &str) -> Result<(), Error>

source§

fn increase_indent(&mut self)

source§

fn decrease_indent(&mut self)

source§

impl<T> CssWriter for Box<T>
where T: CssWriter + ?Sized,

source§

fn write_space(&mut self) -> Result<(), Error>

source§

fn write_newline(&mut self) -> Result<(), Error>

source§

fn write_raw(&mut self, span: Option<Span>, text: &str) -> Result<(), Error>

source§

fn write_str(&mut self, span: Span, s: &str) -> Result<(), Error>

source§

fn increase_indent(&mut self)

source§

fn decrease_indent(&mut self)

Implementors§

source§

impl<W> CssWriter for BasicCssWriter<'_, W>
where W: Write,