pub struct DumpGenerator<VT>where
    VT: Value,{ /* private fields */ }
Expand description

Simple dump Generator

Implementations§

source§

impl<VT> DumpGenerator<VT>where VT: Value,

source

pub fn new() -> DumpGenerator<VT>

Creates a new generator

source

pub fn consume(self) -> String

Returns the data as a String

Trait Implementations§

source§

impl<VT> BaseGenerator for DumpGenerator<VT>where VT: Value,

§

type T = Vec<u8, Global>

The writer
source§

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

Write a slice Read more
source§

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

Write a char Read more
source§

fn get_writer(&mut self) -> &mut Vec<u8, Global>

returns teh writer
source§

fn write_min(&mut self, _: &[u8], min: u8) -> Result<(), Error>

write with minimum Read more
source§

fn new_line(&mut self) -> Result<(), Error>

writes new line Read more
source§

fn indent(&mut self)

indents one step
source§

fn dedent(&mut self)

dedents one step
source§

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

Writes a string with escape sequences Read more
source§

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

writes a string Read more
source§

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>

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>

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_float(&mut self, num: f64) -> Result<(), Error>

writes a float value Read more
source§

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

writes an integer value Read more
source§

unsafe fn write_str_simd(&mut self, string: &mut &[u8]) -> Result<(), Error>

Writes a string with simd-acceleration Read more
source§

impl<VT> Default for DumpGenerator<VT>where VT: Value,

source§

fn default() -> DumpGenerator<VT>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<VT> RefUnwindSafe for DumpGenerator<VT>where VT: RefUnwindSafe,

§

impl<VT> Send for DumpGenerator<VT>where VT: Send,

§

impl<VT> Sync for DumpGenerator<VT>where VT: Sync,

§

impl<VT> Unpin for DumpGenerator<VT>where VT: Unpin,

§

impl<VT> UnwindSafe for DumpGenerator<VT>where VT: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.