Struct toml_edit::OccupiedEntry
source · pub struct OccupiedEntry<'a> { /* private fields */ }
Expand description
A view into a single occupied location in a IndexMap
.
Implementations§
source§impl<'a> OccupiedEntry<'a>
impl<'a> OccupiedEntry<'a>
sourcepub fn key(&self) -> &str
pub fn key(&self) -> &str
Gets a reference to the entry key
§Examples
use toml_edit::Table;
let mut map = Table::new();
assert_eq!("foo", map.entry("foo").key());
sourcepub fn into_mut(self) -> &'a mut Item
pub fn into_mut(self) -> &'a mut Item
Converts the OccupiedEntry into a mutable reference to the value in the entry with a lifetime bound to the map itself
Auto Trait Implementations§
impl<'a> Freeze for OccupiedEntry<'a>
impl<'a> RefUnwindSafe for OccupiedEntry<'a>
impl<'a> Send for OccupiedEntry<'a>
impl<'a> Sync for OccupiedEntry<'a>
impl<'a> Unpin for OccupiedEntry<'a>
impl<'a> !UnwindSafe 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