pub struct JsonDeserializer<'input, const BORROW: bool, A: TokenSource<'input>> { /* private fields */ }Expand description
JSON deserializer using recursive descent.
Generic over a token source A which must implement TokenSource<'input>.
The const generic BORROW controls whether string data can be borrowed:
BORROW=true: strings without escapes are borrowed from input (for slice-based parsing)BORROW=false: all strings are owned (for streaming or owned output)
For slice-based parsing, use SliceAdapter<'input, BORROW>.
For streaming parsing, use StreamingAdapter with BORROW=false.
Implementations§
Source§impl<'input> JsonDeserializer<'input, true, SliceAdapter<'input, true>>
impl<'input> JsonDeserializer<'input, true, SliceAdapter<'input, true>>
Source§impl<'input> JsonDeserializer<'input, false, SliceAdapter<'input, false>>
impl<'input> JsonDeserializer<'input, false, SliceAdapter<'input, false>>
Source§impl<'input, const BORROW: bool, A: TokenSource<'input>> JsonDeserializer<'input, BORROW, A>
impl<'input, const BORROW: bool, A: TokenSource<'input>> JsonDeserializer<'input, BORROW, A>
Sourcepub fn from_adapter(adapter: A) -> Self
pub fn from_adapter(adapter: A) -> Self
Create a deserializer from an existing adapter.
Auto Trait Implementations§
impl<'input, const BORROW: bool, A> Freeze for JsonDeserializer<'input, BORROW, A>where
A: Freeze,
impl<'input, const BORROW: bool, A> RefUnwindSafe for JsonDeserializer<'input, BORROW, A>where
A: RefUnwindSafe,
impl<'input, const BORROW: bool, A> Send for JsonDeserializer<'input, BORROW, A>where
A: Send,
impl<'input, const BORROW: bool, A> Sync for JsonDeserializer<'input, BORROW, A>where
A: Sync,
impl<'input, const BORROW: bool, A> Unpin for JsonDeserializer<'input, BORROW, A>where
A: Unpin,
impl<'input, const BORROW: bool, A> UnwindSafe for JsonDeserializer<'input, BORROW, A>where
A: 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