pub struct OccupiedEntry<'a> { /* private fields */ }Expand description
A view into an occupied entry in a Mapping.
Implementations§
Source§impl<'a> OccupiedEntry<'a>
impl<'a> OccupiedEntry<'a>
Sourcepub fn key(&self) -> Option<YamlNode>
pub fn key(&self) -> Option<YamlNode>
Return the key of this entry as a YamlNode.
Returns None for malformed entries with no key node.
Sourcepub fn get(&self) -> Option<YamlNode>
pub fn get(&self) -> Option<YamlNode>
Return the current value of this entry as a YamlNode.
Returns None for malformed entries with no value node.
Sourcepub fn get_mapping(&self) -> Option<Mapping>
pub fn get_mapping(&self) -> Option<Mapping>
Return the value as a nested Mapping, if it is one.
Sourcepub fn get_sequence(&self) -> Option<Sequence>
pub fn get_sequence(&self) -> Option<Sequence>
Return the value as a nested Sequence, if it is one.
Sourcepub fn remove_entry(self) -> MappingEntry
pub fn remove_entry(self) -> MappingEntry
Remove this entry from the mapping and return the removed
MappingEntry handle. The returned entry is detached from the tree.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for OccupiedEntry<'a>
impl<'a> !Send for OccupiedEntry<'a>
impl<'a> !Sync for OccupiedEntry<'a>
impl<'a> !UnwindSafe for OccupiedEntry<'a>
impl<'a> Freeze for OccupiedEntry<'a>
impl<'a> Unpin for OccupiedEntry<'a>
impl<'a> UnsafeUnpin for OccupiedEntry<'a>
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