pub struct ValueMut<'dom> { /* private fields */ }Expand description
ValueMut is a mutable reference to a Value.
Implementations§
source§impl<'dom> ValueMut<'dom>
impl<'dom> ValueMut<'dom>
pub fn allocator(&self) -> &'dom Bump
pub fn into_object_mut(self) -> Option<ObjectMut<'dom>>
pub fn into_array_mut(self) -> Option<ArrayMut<'dom>>
pub fn pointer_mut( &'dom mut self, path: &JsonPointer<'_> ) -> Option<ValueMut<'dom>>
pub fn get_mut<I: IndexMut>(&'dom mut self, index: I) -> Option<ValueMut<'dom>>
pub fn take(&mut self) -> Value<'dom>
Trait Implementations§
source§impl<'d> JsonValue for ValueMut<'d>
impl<'d> JsonValue for ValueMut<'d>
type ValueType<'dom> = &'dom Value<'dom> where Self: 'dom
source§fn as_number(&self) -> Option<Number>
fn as_number(&self) -> Option<Number>
Returns the
Number value of the JsonValue if it is a Number.source§fn get<I: Index>(&self, index: I) -> Option<Self::ValueType<'_>>
fn get<I: Index>(&self, index: I) -> Option<Self::ValueType<'_>>
Returns the value from index if the
JsonValue is an array or object
The index may be usize or &str. The usize is for array, the &str is for object.source§fn pointer(&self, path: &JsonPointer<'_>) -> Option<Self::ValueType<'_>>
fn pointer(&self, path: &JsonPointer<'_>) -> Option<Self::ValueType<'_>>
Returns the value from pointer path if the
JsonValue is an array or objectsource§fn is_boolean(&self) -> bool
fn is_boolean(&self) -> bool
Returns true if the
JsonValue is a bool.Auto Trait Implementations§
impl<'dom> !RefUnwindSafe for ValueMut<'dom>
impl<'dom> !Send for ValueMut<'dom>
impl<'dom> !Sync for ValueMut<'dom>
impl<'dom> Unpin for ValueMut<'dom>
impl<'dom> !UnwindSafe for ValueMut<'dom>
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