pub struct PrettyGenerator { /* private fields */ }Expand description
Pretty In-Memory Generator, this uses a Vec to store the JSON result and add indent.
Implementations§
Trait Implementations§
Source§impl Generator for PrettyGenerator
impl Generator for PrettyGenerator
type T = Vec<u8>
fn write(&mut self, slice: &[u8]) -> Result<()>
fn write_char(&mut self, ch: u8) -> Result<()>
fn get_writer(&mut self) -> &mut Vec<u8> ⓘ
fn write_min(&mut self, slice: &[u8], _: u8) -> Result<()>
fn new_line(&mut self) -> Result<()>
fn indent(&mut self)
fn dedent(&mut self)
fn write_string_complex(&mut self, string: &str, start: usize) -> Result<()>
fn write_string(&mut self, string: &str) -> Result<()>
fn write_number(&mut self, num: &Number) -> Result<()>
fn write_object(&mut self, object: &Object) -> Result<()>
fn write_json(&mut self, json: &JsonValue) -> Result<()>
Auto Trait Implementations§
impl Freeze for PrettyGenerator
impl RefUnwindSafe for PrettyGenerator
impl Send for PrettyGenerator
impl Sync for PrettyGenerator
impl Unpin for PrettyGenerator
impl UnsafeUnpin for PrettyGenerator
impl UnwindSafe for PrettyGenerator
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