pub trait JSONWriterValue {
    // Required method
    fn write_json<W: JSONWriter>(self, writer: &mut W);
}
Expand description

Types with this trait can be converted to JSON

Required Methods§

source

fn write_json<W: JSONWriter>(self, writer: &mut W)

Appends a JSON representation of self to the output buffer

Implementations on Foreign Types§

source§

impl JSONWriterValue for i16

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl<Key: AsRef<str>, Item> JSONWriterValue for &BTreeMap<Key, Item>where for<'b> &'b Item: JSONWriterValue,

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for u8

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for f64

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl<Item> JSONWriterValue for &Vec<Item>where for<'b> &'b Item: JSONWriterValue,

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for &str

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for u32

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for u16

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for &Cow<'_, str>

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl<Item> JSONWriterValue for &[Item]where for<'b> &'b Item: JSONWriterValue,

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl<T: JSONWriterValue + Copy> JSONWriterValue for &T

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for &String

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl<T: JSONWriterValue> JSONWriterValue for Option<T>

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl<Key: AsRef<str>, Item> JSONWriterValue for &HashMap<Key, Item>where for<'b> &'b Item: JSONWriterValue,

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for i32

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for i8

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for bool

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

source§

impl JSONWriterValue for f32

source§

fn write_json<W: JSONWriter>(self, writer: &mut W)

Implementors§