Struct simd_json::value::generator::PrettyWriterGenerator[][src]

pub struct PrettyWriterGenerator<'w, W, V> where
    V: Value,
    W: 'w + Write
{ /* fields omitted */ }
Expand description

Pretty Writer Generator

Implementations

impl<'w, W, V> PrettyWriterGenerator<'w, W, V> where
    V: Value,
    W: 'w + Write
[src]

pub fn new(
    writer: &'w mut W,
    spaces_per_indent: u16
) -> PrettyWriterGenerator<'w, W, V>
[src]

Creates a new generator

Trait Implementations

impl<'w, W, V> BaseGenerator for PrettyWriterGenerator<'w, W, V> where
    V: Value,
    W: Write
[src]

type T = W

The writer

pub fn get_writer(&mut self) -> &mut W[src]

returns teh writer

pub fn write_min(&mut self, slice: &[u8], u8) -> Result<(), Error>[src]

write with minimum Read more

pub fn new_line(&mut self) -> Result<(), Error>[src]

writes new line Read more

pub fn indent(&mut self)[src]

indents one step

pub fn dedent(&mut self)[src]

dedents one step

fn write(&mut self, slice: &[u8]) -> Result<(), Error>[src]

Write a slice Read more

fn write_char(&mut self, ch: u8) -> Result<(), Error>[src]

Write a char Read more

fn write_string_complex(
    &mut self,
    string: &[u8],
    start: usize
) -> Result<(), Error>
[src]

Writes a string with escape sequences Read more

fn write_string(&mut self, string: &str) -> Result<(), Error>[src]

writes a string Read more

fn write_string_content(&mut self, string: &str) -> Result<(), Error>[src]

writes a string Read more

fn write_simple_string(&mut self, string: &str) -> Result<(), Error>[src]

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

fn write_simple_str_content(&mut self, string: &str) -> Result<(), Error>[src]

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

fn write_float(&mut self, num: f64) -> Result<(), Error>[src]

writes a float value Read more

fn write_int<I>(&mut self, num: I) -> Result<(), Error> where
    I: Integer
[src]

writes an integer value Read more

fn write_int128(&mut self, num: i128) -> Result<(), Error>[src]

👎 Deprecated since 0.1.5:

Please use the write_int function instead

writes an integer 128 bit Read more

fn write_uint(&mut self, num: u64) -> Result<(), Error>[src]

👎 Deprecated since 0.1.5:

Please use the write_int function instead

writes an unsigned integer Read more

fn write_uint128(&mut self, num: u128) -> Result<(), Error>[src]

👎 Deprecated since 0.1.5:

Please use the write_int function instead

writes an unsigned 128bit integer Read more

Auto Trait Implementations

impl<'w, W, V> RefUnwindSafe for PrettyWriterGenerator<'w, W, V> where
    V: RefUnwindSafe,
    W: RefUnwindSafe

impl<'w, W, V> Send for PrettyWriterGenerator<'w, W, V> where
    V: Send,
    W: Send

impl<'w, W, V> Sync for PrettyWriterGenerator<'w, W, V> where
    V: Sync,
    W: Sync

impl<'w, W, V> Unpin for PrettyWriterGenerator<'w, W, V> where
    V: Unpin

impl<'w, W, V> !UnwindSafe for PrettyWriterGenerator<'w, W, V>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.