pub struct Field<'read, 'parent, R: Read<'read>, S: Stack> { /* private fields */ }Expand description
A field within an object.
Implementations§
Source§impl<'read, 'parent, R: Read<'read>, S: Stack> Field<'read, 'parent, R, S>
impl<'read, 'parent, R: Read<'read>, S: Stack> Field<'read, 'parent, R, S>
Sourcepub fn key(
&mut self,
) -> &mut (impl use<'read, 'parent, R, S> + Iterator<Item = Result<char, JsonError<'read, R, S>>>)
pub fn key( &mut self, ) -> &mut (impl use<'read, 'parent, R, S> + Iterator<Item = Result<char, JsonError<'read, 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> Freeze for Field<'read, 'parent, R, S>
impl<'read, 'parent, R, S> RefUnwindSafe for Field<'read, 'parent, R, S>where
S: RefUnwindSafe,
R: RefUnwindSafe,
<R as Read<'read>>::Error: RefUnwindSafe,
<S as Stack>::Error: RefUnwindSafe,
impl<'read, 'parent, R, S> Send for Field<'read, 'parent, R, S>
impl<'read, 'parent, R, S> Sync for Field<'read, 'parent, R, S>
impl<'read, 'parent, R, S> Unpin for Field<'read, 'parent, R, S>
impl<'read, 'parent, R, S> !UnwindSafe for Field<'read, 'parent, R, S>
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