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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes