pub struct Field<'read, 'parent, R, S>{ /* private fields */ }Expand description
A field within an object.
Implementations§
Source§impl<'read, 'parent, R, S> Field<'read, 'parent, R, S>
impl<'read, 'parent, R, S> Field<'read, 'parent, R, S>
Sourcepub fn key(
&mut self,
) -> &mut (impl Iterator<Item = Result<char, JsonError<'read, R, S>>> + use<'read, 'parent, R, S>)
pub fn key( &mut self, ) -> &mut (impl Iterator<Item = Result<char, JsonError<'read, R, S>>> + use<'read, 'parent, R, S>)
Access the iterator for the string used as the field’s key.
The iterator will yield the individual characters within the string represented by the JSON serialization, with all escape sequences handled.
If the JSON underlying is invalid, the iterator will error, and while Field::value may
still be called, all further attempted accesses will yield an error.
If the JSON underlying is valid yet does not represent a valid UTF-8 sequence, the iterator
will error, yet Field::value may still be called and deserialization may continue. The rest
of the key will not be accessible however.
Trait Implementations§
Auto Trait Implementations§
impl<'read, 'parent, R, S> !UnwindSafe for Field<'read, 'parent, R, S>
impl<'read, 'parent, R, S> Freeze for Field<'read, 'parent, R, S>where
StringKey<'read, 'parent, R, S>: Freeze,
impl<'read, 'parent, R, S> RefUnwindSafe for Field<'read, 'parent, R, S>where
StringKey<'read, 'parent, R, S>: RefUnwindSafe,
impl<'read, 'parent, R, S> Send for Field<'read, 'parent, R, S>where
StringKey<'read, 'parent, R, S>: Send,
impl<'read, 'parent, R, S> Sync for Field<'read, 'parent, R, S>where
StringKey<'read, 'parent, R, S>: Sync,
impl<'read, 'parent, R, S> Unpin for Field<'read, 'parent, R, S>where
StringKey<'read, 'parent, R, S>: Unpin,
impl<'read, 'parent, R, S> UnsafeUnpin for Field<'read, 'parent, R, S>where
StringKey<'read, 'parent, R, S>: UnsafeUnpin,
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