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§
source§impl<'a, W: Write> WriteJs for JsWriter<'a, W>
impl<'a, W: Write> WriteJs for JsWriter<'a, W>
fn increase_indent(&mut self) -> Result
fn decrease_indent(&mut self) -> Result
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, 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
fn add_srcmap(&mut self, pos: BytePos) -> Result
fn commit_pending_semi(&mut self) -> Result
Auto Trait Implementations§
impl<'a, W> Freeze for JsWriter<'a, W>where
W: Freeze,
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more