pub struct Value<'bytes, 'parent, B: BytesLike<'bytes>, S: Stack> { /* private fields */ }
Expand description
A JSON value.
Implementations§
Source§impl<'bytes, 'parent, B: BytesLike<'bytes>, S: Stack> Value<'bytes, 'parent, B, S>
impl<'bytes, 'parent, B: BytesLike<'bytes>, S: Stack> Value<'bytes, 'parent, B, S>
Sourcepub fn is_object(&self) -> Result<bool, JsonError<'bytes, B, S>>
pub fn is_object(&self) -> Result<bool, JsonError<'bytes, B, S>>
Check if the current item is an object.
Sourcepub fn fields(
self,
) -> Result<FieldIterator<'bytes, 'parent, B, S>, JsonError<'bytes, B, S>>
pub fn fields( self, ) -> Result<FieldIterator<'bytes, 'parent, B, S>, JsonError<'bytes, B, S>>
Iterate over the fields within this object.
If a field is present multiple times, this will yield each instance.
Sourcepub fn is_array(&self) -> Result<bool, JsonError<'bytes, B, S>>
pub fn is_array(&self) -> Result<bool, JsonError<'bytes, B, S>>
Check if the current item is an array.
Sourcepub fn iterate(
self,
) -> Result<ArrayIterator<'bytes, 'parent, B, S>, JsonError<'bytes, B, S>>
pub fn iterate( self, ) -> Result<ArrayIterator<'bytes, 'parent, B, S>, JsonError<'bytes, B, S>>
Iterate over all items within this container.
Sourcepub fn is_str(&self) -> Result<bool, JsonError<'bytes, B, S>>
pub fn is_str(&self) -> Result<bool, JsonError<'bytes, B, S>>
Check if the current item is a string.
Trait Implementations§
Auto Trait Implementations§
impl<'bytes, 'parent, B, S> Freeze for Value<'bytes, 'parent, B, S>
impl<'bytes, 'parent, B, S> RefUnwindSafe for Value<'bytes, 'parent, B, S>where
B: RefUnwindSafe,
S: RefUnwindSafe,
<B as BytesLike<'bytes>>::Error: RefUnwindSafe,
<S as Stack>::Error: RefUnwindSafe,
impl<'bytes, 'parent, B, S> Send for Value<'bytes, 'parent, B, S>
impl<'bytes, 'parent, B, S> Sync for Value<'bytes, 'parent, B, S>
impl<'bytes, 'parent, B, S> Unpin for Value<'bytes, 'parent, B, S>
impl<'bytes, 'parent, B, S> !UnwindSafe for Value<'bytes, 'parent, B, 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