[−][src]Struct jsonxs::JsonXsSerializer
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]
&mut self,
key: K,
value: V
) -> Result<()>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,