pub struct PrettyWriterGenerator<'a, W> where
W: 'a + Write, { /* private fields */ }Expand description
Pretty Writer Generator, this uses a custom writer to store the JSON result and add indent.
Implementations
impl<'a, W> PrettyWriterGenerator<'a, W> where
W: 'a + Write,
impl<'a, W> PrettyWriterGenerator<'a, W> where
W: 'a + Write,
pub fn new(writer: &'a mut W, spaces: u16) -> PrettyWriterGenerator<'a, W>
Trait Implementations
impl<'a, W> Generator for PrettyWriterGenerator<'a, W> where
W: Write,
impl<'a, W> Generator for PrettyWriterGenerator<'a, W> where
W: Write,
type T = W
fn get_writer(&mut self) -> &mut W
fn write_min(&mut self, slice: &[u8], u8) -> Result<(), Error>
fn new_line(&mut self) -> Result<(), Error>
fn indent(&mut self)
fn dedent(&mut self)
fn write(&mut self, slice: &[u8]) -> Result<(), Error>
fn write_char(&mut self, ch: u8) -> Result<(), Error>
fn write_string_complex(
&mut self,
string: &str,
start: usize
) -> Result<(), Error>
fn write_string(&mut self, string: &str) -> Result<(), Error>
fn write_number(&mut self, num: &Number) -> Result<(), Error>
fn write_object(&mut self, object: &Object) -> Result<(), Error>
fn write_json(&mut self, json: &JsonValue) -> Result<(), Error>
Auto Trait Implementations
impl<'a, W> RefUnwindSafe for PrettyWriterGenerator<'a, W> where
W: RefUnwindSafe,
impl<'a, W> Send for PrettyWriterGenerator<'a, W> where
W: Send,
impl<'a, W> Sync for PrettyWriterGenerator<'a, W> where
W: Sync,
impl<'a, W> Unpin for PrettyWriterGenerator<'a, W>
impl<'a, W> !UnwindSafe for PrettyWriterGenerator<'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
