Struct simd_json::prelude::generator::PrettyWriterGenerator
source · pub struct PrettyWriterGenerator<'w, W>where
W: 'w + Write,{ /* private fields */ }
Expand description
Pretty Writer Generator
Implementations§
source§impl<'w, W> PrettyWriterGenerator<'w, W>where
W: 'w + Write,
impl<'w, W> PrettyWriterGenerator<'w, W>where
W: 'w + Write,
sourcepub fn new(
writer: &'w mut W,
spaces_per_indent: u16,
) -> PrettyWriterGenerator<'w, W>
pub fn new( writer: &'w mut W, spaces_per_indent: u16, ) -> PrettyWriterGenerator<'w, W>
Creates a new generator
Trait Implementations§
source§impl<'w, W> BaseGenerator for PrettyWriterGenerator<'w, W>where
W: Write,
impl<'w, W> BaseGenerator for PrettyWriterGenerator<'w, W>where
W: Write,
source§fn get_writer(&mut self) -> &mut W
fn get_writer(&mut self) -> &mut W
returns the writer
source§fn write_min(&mut self, slice: &[u8], _: u8) -> Result<(), Error>
fn write_min(&mut self, slice: &[u8], _: u8) -> Result<(), Error>
write with minimum Read more
source§fn write_string_content(&mut self, string: &str) -> Result<(), Error>
fn write_string_content(&mut self, string: &str) -> Result<(), Error>
writes a string Read more
source§fn write_simple_string(&mut self, string: &str) -> Result<(), Error>
fn write_simple_string(&mut self, string: &str) -> Result<(), Error>
writes a simple string (usually short and non escaped)
This means we can skip the simd accelerated writing which is
expensive on short strings. Read more
source§fn write_simple_str_content(&mut self, string: &str) -> Result<(), Error>
fn write_simple_str_content(&mut self, string: &str) -> Result<(), Error>
writes a simple string content (usually short and non escaped)
This means we can skip the simd accelerated writing which is
expensive on short strings. Read more
Auto Trait Implementations§
impl<'w, W> Freeze for PrettyWriterGenerator<'w, W>
impl<'w, W> RefUnwindSafe for PrettyWriterGenerator<'w, W>where
W: RefUnwindSafe,
impl<'w, W> Send for PrettyWriterGenerator<'w, W>where
W: Send,
impl<'w, W> Sync for PrettyWriterGenerator<'w, W>where
W: Sync,
impl<'w, W> Unpin for PrettyWriterGenerator<'w, W>
impl<'w, W> !UnwindSafe for PrettyWriterGenerator<'w, 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