Struct simd_json::value::generator::PrettyWriterGenerator
source · pub struct PrettyWriterGenerator<'w, W, V>where
W: 'w + Write,
V: Value,{ /* private fields */ }Expand description
Pretty Writer Generator
Implementations§
source§impl<'w, W, V> PrettyWriterGenerator<'w, W, V>where
W: 'w + Write,
V: Value,
impl<'w, W, V> PrettyWriterGenerator<'w, W, V>where W: 'w + Write, V: Value,
sourcepub fn new(
writer: &'w mut W,
spaces_per_indent: u16
) -> PrettyWriterGenerator<'w, W, V>
pub fn new( writer: &'w mut W, spaces_per_indent: u16 ) -> PrettyWriterGenerator<'w, W, V>
Creates a new generator
Trait Implementations§
source§impl<'w, W, V> BaseGenerator for PrettyWriterGenerator<'w, W, V>where
W: Write,
V: Value,
impl<'w, W, V> BaseGenerator for PrettyWriterGenerator<'w, W, V>where W: Write, V: Value,
source§fn get_writer(&mut self) -> &mut W
fn get_writer(&mut self) -> &mut W
returns teh 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_complex(
&mut self,
string: &[u8],
start: usize
) -> Result<(), Error>
fn write_string_complex( &mut self, string: &[u8], start: usize ) -> Result<(), Error>
Writes a string with escape sequences 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
source§fn write_int<I>(&mut self, num: I) -> Result<(), Error>where
I: Integer,
fn write_int<I>(&mut self, num: I) -> Result<(), Error>where I: Integer,
writes an integer value Read more
source§fn write_int128(&mut self, num: i128) -> Result<(), Error>
fn write_int128(&mut self, num: i128) -> Result<(), Error>
👎Deprecated since 0.1.5: Please use the write_int function instead
writes an integer 128 bit Read more
source§fn write_uint(&mut self, num: u64) -> Result<(), Error>
fn write_uint(&mut self, num: u64) -> Result<(), Error>
👎Deprecated since 0.1.5: Please use the write_int function instead
writes an unsigned integer Read more