pub struct FormatDeserializer<'input, const BORROW: bool, P> { /* private fields */ }Expand description
Generic deserializer that drives a format-specific parser directly into Partial.
The const generic BORROW controls whether string data can be borrowed:
BORROW=true: strings without escapes are borrowed from inputBORROW=false: all strings are owned
Implementations§
Source§impl<'input, P> FormatDeserializer<'input, true, P>
impl<'input, P> FormatDeserializer<'input, true, P>
Source§impl<'input, P> FormatDeserializer<'input, false, P>
impl<'input, P> FormatDeserializer<'input, false, P>
Source§impl<'input, const BORROW: bool, P> FormatDeserializer<'input, BORROW, P>
impl<'input, const BORROW: bool, P> FormatDeserializer<'input, BORROW, P>
Sourcepub fn into_inner(self) -> P
pub fn into_inner(self) -> P
Consume the facade and return the underlying parser.
Sourcepub fn parser_mut(&mut self) -> &mut P
pub fn parser_mut(&mut self) -> &mut P
Borrow the inner parser mutably.
Source§impl<'input, P> FormatDeserializer<'input, true, P>where
P: FormatParser<'input>,
impl<'input, P> FormatDeserializer<'input, true, P>where
P: FormatParser<'input>,
Sourcepub fn deserialize<T>(&mut self) -> Result<T, DeserializeError<P::Error>>where
T: Facet<'input>,
pub fn deserialize<T>(&mut self) -> Result<T, DeserializeError<P::Error>>where
T: Facet<'input>,
Deserialize the next value in the stream into T, allowing borrowed strings.
Sourcepub fn deserialize_root<T>(&mut self) -> Result<T, DeserializeError<P::Error>>where
T: Facet<'input>,
pub fn deserialize_root<T>(&mut self) -> Result<T, DeserializeError<P::Error>>where
T: Facet<'input>,
Deserialize the next value in the stream into T (for backward compatibility).
Source§impl<'input, P> FormatDeserializer<'input, false, P>where
P: FormatParser<'input>,
impl<'input, P> FormatDeserializer<'input, false, P>where
P: FormatParser<'input>,
Sourcepub fn deserialize<T>(&mut self) -> Result<T, DeserializeError<P::Error>>where
T: Facet<'static>,
pub fn deserialize<T>(&mut self) -> Result<T, DeserializeError<P::Error>>where
T: Facet<'static>,
Deserialize the next value in the stream into T, using owned strings.
Sourcepub fn deserialize_root<T>(&mut self) -> Result<T, DeserializeError<P::Error>>where
T: Facet<'static>,
pub fn deserialize_root<T>(&mut self) -> Result<T, DeserializeError<P::Error>>where
T: Facet<'static>,
Deserialize the next value in the stream into T (for backward compatibility).
Source§impl<'input, const BORROW: bool, P> FormatDeserializer<'input, BORROW, P>where
P: FormatParser<'input>,
impl<'input, const BORROW: bool, P> FormatDeserializer<'input, BORROW, P>where
P: FormatParser<'input>,
Sourcepub fn deserialize_into(
&mut self,
wip: Partial<'input, BORROW>,
) -> Result<Partial<'input, BORROW>, DeserializeError<P::Error>>
pub fn deserialize_into( &mut self, wip: Partial<'input, BORROW>, ) -> Result<Partial<'input, BORROW>, DeserializeError<P::Error>>
Main deserialization entry point - deserialize into a Partial.
Auto Trait Implementations§
impl<'input, const BORROW: bool, P> Freeze for FormatDeserializer<'input, BORROW, P>where
P: Freeze,
impl<'input, const BORROW: bool, P> RefUnwindSafe for FormatDeserializer<'input, BORROW, P>where
P: RefUnwindSafe,
impl<'input, const BORROW: bool, P> Send for FormatDeserializer<'input, BORROW, P>where
P: Send,
impl<'input, const BORROW: bool, P> Sync for FormatDeserializer<'input, BORROW, P>where
P: Sync,
impl<'input, const BORROW: bool, P> Unpin for FormatDeserializer<'input, BORROW, P>where
P: Unpin,
impl<'input, const BORROW: bool, P> UnwindSafe for FormatDeserializer<'input, BORROW, P>where
P: 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