Struct swc_ecma_codegen::text_writer::JsWriter
source · [−]pub struct JsWriter<'a, W: Write> { /* private fields */ }
Expand description
Ported from createTextWriter
of the typescript compiler.
https://github.com/Microsoft/TypeScript/blob/45eaf42006/src/compiler/utilities.ts#L2548
Implementations
Trait Implementations
sourceimpl<'a, W: Write> WriteJs for JsWriter<'a, W>
impl<'a, W: Write> WriteJs for JsWriter<'a, W>
sourcefn target(&self) -> EsVersion
fn target(&self) -> EsVersion
Returns javascript target which should be used while generating code. Read more
fn increase_indent(&mut self) -> Result
fn decrease_indent(&mut self) -> Result
sourcefn write_semi(&mut self, span: Option<Span>) -> Result
fn write_semi(&mut self, span: Option<Span>) -> Result
This may write semicolon.
fn write_space(&mut self) -> Result
fn write_keyword(&mut self, span: Option<Span>, s: &'static str) -> Result
fn write_operator(&mut self, span: Option<Span>, s: &str) -> Result
fn write_param(&mut self, s: &str) -> Result
fn write_property(&mut self, s: &str) -> Result
fn write_line(&mut self) -> Result
fn write_lit(&mut self, span: Span, s: &str) -> Result
fn write_comment(&mut self, span: Span, s: &str) -> Result
fn write_str_lit(&mut self, span: Span, s: &str) -> Result
fn write_str(&mut self, s: &str) -> Result
fn write_symbol(&mut self, span: Span, s: &str) -> Result
fn write_punct(&mut self, span: Option<Span>, s: &'static str) -> Result
fn care_about_srcmap(&self) -> bool
Auto Trait Implementations
impl<'a, W> RefUnwindSafe for JsWriter<'a, W> where
W: RefUnwindSafe,
impl<'a, W> Send for JsWriter<'a, W> where
W: Send,
impl<'a, W> Sync for JsWriter<'a, W> where
W: Sync,
impl<'a, W> Unpin for JsWriter<'a, W> where
W: Unpin,
impl<'a, W> !UnwindSafe for JsWriter<'a, W>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more