swc_xml_codegen::writer

Trait XmlWriter

source
pub trait XmlWriter {
    // Required methods
    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_multiline_raw(&mut self, span: Span, s: &str) -> Result;
    fn increase_indent(&mut self);
    fn decrease_indent(&mut self);
}

Required Methods§

source

fn write_space(&mut self) -> Result

source

fn write_newline(&mut self) -> Result

source

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

source

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

source

fn increase_indent(&mut self)

source

fn decrease_indent(&mut self)

Implementations on Foreign Types§

source§

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

source§

fn write_space(&mut self) -> Result

source§

fn write_newline(&mut self) -> Result

source§

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

source§

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

source§

fn increase_indent(&mut self)

source§

fn decrease_indent(&mut self)

source§

impl<T: XmlWriter + ?Sized> XmlWriter for Box<T>

source§

fn write_space(&mut self) -> Result

source§

fn write_newline(&mut self) -> Result

source§

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

source§

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

source§

fn increase_indent(&mut self)

source§

fn decrease_indent(&mut self)

Implementors§

source§

impl<W> XmlWriter for BasicXmlWriter<'_, W>
where W: Write,