Trait value_trait::generator::BaseGenerator [−][src]
Base generator trait
Associated Types
Loading content...Required methods
fn get_writer(&mut self) -> &mut Self::T
[src]
returns teh writer
fn write_min(&mut self, slice: &[u8], min: u8) -> Result<()>
[src]
Provided methods
fn write(&mut self, slice: &[u8]) -> Result<()>
[src]
fn write_char(&mut self, ch: u8) -> Result<()>
[src]
fn new_line(&mut self) -> Result<()>
[src]
fn indent(&mut self)
[src]
indents one step
fn dedent(&mut self)
[src]
dedents one step
fn write_string_complex(&mut self, string: &[u8], start: usize) -> Result<()>
[src]
fn write_string(&mut self, string: &str) -> Result<()>
[src]
fn write_string_content(&mut self, string: &str) -> Result<()>
[src]
fn write_simple_string(&mut self, string: &str) -> Result<()>
[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.
Errors
if the write fails
fn write_simple_str_content(&mut self, string: &str) -> Result<()>
[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.
Errors
if the write fails
fn write_float(&mut self, num: f64) -> Result<()>
[src]
fn write_int<I: Integer>(&mut self, num: I) -> Result<()>
[src]
fn write_int128(&mut self, num: i128) -> Result<()>
[src]
👎 Deprecated since 0.1.5:
Please use the write_int function instead
fn write_uint(&mut self, num: u64) -> Result<()>
[src]
👎 Deprecated since 0.1.5:
Please use the write_int function instead
fn write_uint128(&mut self, num: u128) -> Result<()>
[src]
👎 Deprecated since 0.1.5:
Please use the write_int function instead
Implementors
impl<'w, W, V> BaseGenerator for PrettyWriterGenerator<'w, W, V> where
W: Write,
V: Value,
[src]
W: Write,
V: Value,
type T = W
fn get_writer(&mut self) -> &mut W
[src]
fn write_min(&mut self, slice: &[u8], _: u8) -> Result<()>
[src]
fn new_line(&mut self) -> Result<()>
[src]
fn indent(&mut self)
[src]
fn dedent(&mut self)
[src]
impl<'w, W, V> BaseGenerator for WriterGenerator<'w, W, V> where
W: Write,
V: Value,
[src]
W: Write,
V: Value,