[−][src]Enum ijson::object::Entry
A view into a single entry in an IObject
, which may be either vacant
or occupied.
Obtained using IObject::entry
.
Variants
Occupied(OccupiedEntry<'a>)
An occupied entry.
Vacant(VacantEntry<'a>)
A vacant entry.
Implementations
impl<'a> Entry<'a>
[src]
pub fn or_insert(self, default: IValue) -> &'a mut IValue
[src]
Fills this entry if it's currently vacant, and then returns a mutable reference to the value at this entry.
pub fn or_insert_with(self, default: impl FnOnce() -> IValue) -> &'a mut IValue
[src]
Fills this entry by calling the specified function if it's currently vacant, and then returns a mutable reference to the value at this entry.
pub fn key(&self) -> &IString
[src]
Returns a reference to the key at this entry.
pub fn and_modify(self, f: impl FnOnce(&mut IValue)) -> Self
[src]
Updates the value in this entry by calling the specified mutation function if the entry is occupied.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Entry<'a>
impl<'a> Send for Entry<'a>
impl<'a> Sync for Entry<'a>
impl<'a> Unpin for Entry<'a>
impl<'a> !UnwindSafe for Entry<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,