pub struct Deserializer<'bytes, B, S>{ /* private fields */ }
Expand description
A deserializer for a JSON-encoded structure.
Implementations§
Source§impl<'bytes, B, S> Deserializer<'bytes, B, S>
impl<'bytes, B, S> Deserializer<'bytes, B, S>
Sourcepub fn new(
bytes: B,
) -> Result<Deserializer<'bytes, B, S>, JsonError<'bytes, B, S>>
pub fn new( bytes: B, ) -> Result<Deserializer<'bytes, B, S>, JsonError<'bytes, B, S>>
Create a new deserializer.
Sourcepub fn value(
&mut self,
) -> Result<Value<'bytes, '_, B, S>, JsonError<'bytes, B, S>>
pub fn value( &mut self, ) -> Result<Value<'bytes, '_, B, S>, JsonError<'bytes, B, S>>
Obtain the Value
representing the serialized structure.
This takes a mutable reference as Deserializer
is the owned object representing the
deserializer’s state. However, this is not eligible to be called more than once, even after
the initial mutable borrow is dropped. Multiple calls to this function will cause an error to
be returned.
Auto Trait Implementations§
impl<'bytes, B, S> Freeze for Deserializer<'bytes, B, S>
impl<'bytes, B, S> RefUnwindSafe for Deserializer<'bytes, B, S>where
B: RefUnwindSafe,
S: RefUnwindSafe,
<B as BytesLike<'bytes>>::Error: RefUnwindSafe,
<S as Stack>::Error: RefUnwindSafe,
impl<'bytes, B, S> Send for Deserializer<'bytes, B, S>
impl<'bytes, B, S> Sync for Deserializer<'bytes, B, S>
impl<'bytes, B, S> Unpin for Deserializer<'bytes, B, S>
impl<'bytes, B, S> UnwindSafe for Deserializer<'bytes, B, S>where
B: UnwindSafe,
S: UnwindSafe,
<B as BytesLike<'bytes>>::Error: UnwindSafe,
<S as Stack>::Error: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more