[][src]Struct jsonxs::JsonXsSerializer

pub struct JsonXsSerializer<'a> { /* fields omitted */ }

JSON serializer with eXtra Small memory footprint. Very immature, experimental code. The main idea is that application data structure is NOT duplicated into another one, just for the purpose of saving JSON. Instead, JSON is generated by calls to this api, and client is responsible for making calls in proper sequence. JsonFx only helps with basic stuff like tokenization.

TODO: add automatic scope closing (and make it the only way to close level)

Implementations

impl<'_> JsonXsSerializer<'_>[src]

pub fn use_stdout() -> Self[src]

pub fn use_file<P: AsRef<Path>>(path: P) -> Result<Self>[src]

pub fn done(&mut self) -> Result<()>[src]

pub fn open_obj<K: Into<JsonXsValue> + Clone>(&mut self, key: K) -> Result<()>[src]

pub fn open_array<K: Into<JsonXsValue>>(&mut self, key: K) -> Result<()>[src]

pub fn close(&mut self) -> Result<()>[src]

pub fn element<K: Into<JsonXsValue>, V: Into<JsonXsValue>>(
    &mut self,
    key: K,
    value: V
) -> Result<()>
[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for JsonXsSerializer<'a>

impl<'a> !Send for JsonXsSerializer<'a>

impl<'a> !Sync for JsonXsSerializer<'a>

impl<'a> Unpin for JsonXsSerializer<'a>

impl<'a> !UnwindSafe for JsonXsSerializer<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.