pub struct JsonValueBuilder<'data, 'tokens, E> { /* private fields */ }
Expand description

Creates JSON from a value reader

Implementations§

source§

impl<'data, 'tokens, E> JsonValueBuilder<'data, 'tokens, E>
where E: Encoding + Clone,

source

pub fn with_options(self, options: JsonOptions) -> Self

Output JSON with the set of options

source

pub fn to_writer<W>(self, writer: W) -> Result<(), Error>
where W: Write,

Output JSON to the given writer

source

pub fn to_vec(self) -> Vec<u8>

Output JSON to vec that contains UTF-8 data

source

pub fn to_string(self) -> String

Output JSON to a string

Trait Implementations§

source§

impl<'data, 'tokens, E> Serialize for JsonValueBuilder<'data, 'tokens, E>
where E: Encoding + Clone,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'data, 'tokens, E> Freeze for JsonValueBuilder<'data, 'tokens, E>
where E: Freeze,

§

impl<'data, 'tokens, E> RefUnwindSafe for JsonValueBuilder<'data, 'tokens, E>
where E: RefUnwindSafe,

§

impl<'data, 'tokens, E> Send for JsonValueBuilder<'data, 'tokens, E>
where E: Send,

§

impl<'data, 'tokens, E> Sync for JsonValueBuilder<'data, 'tokens, E>
where E: Sync,

§

impl<'data, 'tokens, E> Unpin for JsonValueBuilder<'data, 'tokens, E>
where E: Unpin,

§

impl<'data, 'tokens, E> UnwindSafe for JsonValueBuilder<'data, 'tokens, E>
where E: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.