[][src]Struct rustc_ap_serialize::json::PrettyEncoder

pub struct PrettyEncoder<'a> { /* fields omitted */ }

Another encoder for JSON, but prints out human-readable JSON instead of compact data

Methods

impl<'a> PrettyEncoder<'a>[src]

pub fn new(writer: &'a mut dyn Write) -> PrettyEncoder<'a>[src]

Creates a new encoder whose output will be written to the specified writer

pub fn set_indent(&mut self, indent: usize)[src]

Sets the number of spaces to indent for each level. This is safe to set during encoding.

Trait Implementations

impl<'a> Encoder for PrettyEncoder<'a>[src]

type Error = EncoderError

Auto Trait Implementations

impl<'a> !Send for PrettyEncoder<'a>

impl<'a> !Sync for PrettyEncoder<'a>

impl<'a> Unpin for PrettyEncoder<'a>

impl<'a> !UnwindSafe for PrettyEncoder<'a>

impl<'a> !RefUnwindSafe for PrettyEncoder<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]