pub struct PathSink<'a> { /* private fields */ }Expand description
A path sink tracks the current path during deserialization.
Implementations§
Trait Implementations§
Source§impl<'a> Sink for PathSink<'a>
impl<'a> Sink for PathSink<'a>
Source§fn map(&mut self, state: &DeserializerState<'_>) -> Result<(), Error>
fn map(&mut self, state: &DeserializerState<'_>) -> Result<(), Error>
Begins the deserialization of a map. Read more
Source§fn seq(&mut self, state: &DeserializerState<'_>) -> Result<(), Error>
fn seq(&mut self, state: &DeserializerState<'_>) -> Result<(), Error>
Begins the receiving process for sequences. Read more
Source§fn next_key(
&mut self,
state: &DeserializerState<'_>,
) -> Result<SinkHandle<'_>, Error>
fn next_key( &mut self, state: &DeserializerState<'_>, ) -> Result<SinkHandle<'_>, Error>
Returns a sink for the next key in a map.
Source§fn next_value(
&mut self,
state: &DeserializerState<'_>,
) -> Result<SinkHandle<'_>, Error>
fn next_value( &mut self, state: &DeserializerState<'_>, ) -> Result<SinkHandle<'_>, Error>
Returns a sink for the next value in a map or sequence.
Source§fn descriptor(&self) -> &dyn Descriptor
fn descriptor(&self) -> &dyn Descriptor
Returns a descriptor for this type.
Source§fn expecting(&self) -> Cow<'_, str>
fn expecting(&self) -> Cow<'_, str>
Utility method to return an expectation message that is used in error messages. Read more
Source§fn unexpected_atom(
&mut self,
atom: Atom<'_>,
state: &DeserializerState<'_>,
) -> Result<(), Error>
fn unexpected_atom( &mut self, atom: Atom<'_>, state: &DeserializerState<'_>, ) -> Result<(), Error>
Implements a default fallback handling for atoms.
Source§fn value_for_key(
&mut self,
key: &str,
state: &DeserializerState<'_>,
) -> Result<Option<SinkHandle<'_>>, Error>
fn value_for_key( &mut self, key: &str, state: &DeserializerState<'_>, ) -> Result<Option<SinkHandle<'_>>, Error>
Returns a value sink for a specific struct field. Read more
Auto Trait Implementations§
impl<'a> Freeze for PathSink<'a>
impl<'a> !RefUnwindSafe for PathSink<'a>
impl<'a> !Send for PathSink<'a>
impl<'a> !Sync for PathSink<'a>
impl<'a> Unpin for PathSink<'a>
impl<'a> !UnwindSafe for PathSink<'a>
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