Trait simd_json::value::prelude::Writable [−][src]
pub trait Writable {
#[must_use]
pub fn encode(&self) -> String;
#[must_use]
pub fn encode_pp(&self) -> String;
pub fn write<'writer, W>(&self, w: &mut W) -> Result<(), Error>
where
W: 'writer + Write;
pub fn write_pp<'writer, W>(&self, w: &mut W) -> Result<(), Error>
where
W: 'writer + Write;
}A Value that can be serialized and written
Required methods
#[must_use]pub fn encode(&self) -> String[src]
#[must_use]
pub fn encode(&self) -> StringEncodes the value into it’s JSON representation as a string
#[must_use]pub fn encode_pp(&self) -> String[src]
#[must_use]
pub fn encode_pp(&self) -> StringEncodes the value into it’s JSON representation as a string (pretty printed)
pub fn write<'writer, W>(&self, w: &mut W) -> Result<(), Error> where
W: 'writer + Write, [src]
W: 'writer + Write,
Encodes the value into it’s JSON representation into a Writer
Errors
Will return Err if an IO error is encountered
pub fn write_pp<'writer, W>(&self, w: &mut W) -> Result<(), Error> where
W: 'writer + Write, [src]
W: 'writer + Write,
Encodes the value into it’s JSON representation into a Writer, pretty printed
Errors
Will return Err if an IO error is encountered.
Implementors
Loading content...