Trait simd_json::prelude::Writable[][src]

pub trait Writable {
    #[must_use]
    fn encode(&self) -> String;
#[must_use] fn encode_pp(&self) -> String;
fn write<'writer, W>(&self, w: &mut W) -> Result<(), Error>
    where
        W: 'writer + Write
;
fn write_pp<'writer, W>(&self, w: &mut W) -> Result<(), Error>
    where
        W: 'writer + Write
; }
Expand description

Prelude to include needed traits A Value that can be serialized and written

Required methods

#[must_use]
fn encode(&self) -> String
[src]

Expand description

Encodes the value into it’s JSON representation as a string

#[must_use]
fn encode_pp(&self) -> String
[src]

Expand description

Encodes the value into it’s JSON representation as a string (pretty printed)

fn write<'writer, W>(&self, w: &mut W) -> Result<(), Error> where
    W: 'writer + Write
[src]

Expand description

Encodes the value into it’s JSON representation into a Writer

Errors

Will return Err if an IO error is encountered

fn write_pp<'writer, W>(&self, w: &mut W) -> Result<(), Error> where
    W: 'writer + Write
[src]

Expand description

Encodes the value into it’s JSON representation into a Writer, pretty printed

Errors

Will return Err if an IO error is encountered.

Loading content...

Implementors

impl Writable for simd_json::value::owned::Value[src]

fn encode(&self) -> String[src]

fn encode_pp(&self) -> String[src]

fn write<'writer, W>(&self, w: &mut W) -> Result<()> where
    W: 'writer + Write
[src]

fn write_pp<'writer, W>(&self, w: &mut W) -> Result<()> where
    W: 'writer + Write
[src]

impl<'value> Writable for simd_json::value::borrowed::Value<'value>[src]

fn encode(&self) -> String[src]

fn encode_pp(&self) -> String[src]

fn write<'writer, W>(&self, w: &mut W) -> Result<()> where
    W: 'writer + Write
[src]

fn write_pp<'writer, W>(&self, w: &mut W) -> Result<()> where
    W: 'writer + Write
[src]

Loading content...