Trait JSONWriterValue

Source
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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl JSONWriterValue for &Cow<'_, str>

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 &String

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)

Source§

impl JSONWriterValue for f64

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 i16

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 i64

Source§

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

Source§

impl JSONWriterValue for i128

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 u16

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 u64

Source§

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

Source§

impl JSONWriterValue for u128

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<Item> JSONWriterValue for &Vec<Item>
where for<'b> &'b Item: JSONWriterValue,

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<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<T: JSONWriterValue + Copy> JSONWriterValue for &T

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)

Implementors§