swc_css_codegen/writer/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use std::fmt::Result;

use auto_impl::auto_impl;
use swc_common::Span;

pub mod basic;

#[auto_impl(&mut, Box)]
pub trait CssWriter {
    fn write_space(&mut self) -> Result;

    fn write_newline(&mut self) -> Result;

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

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

    fn increase_indent(&mut self);

    fn decrease_indent(&mut self);
}