Enum tst::tst_map::Entry
[−]
[src]
pub enum Entry<'x, Value: 'x> { Occupied(OccupiedEntry<'x, Value>), Vacant(VacantEntry<'x, Value>), }
A view into a single location in a TSTMap
, which may be vacant or occupied.
Variants
Occupied(OccupiedEntry<'x, Value>)
A vacant Entry
Vacant(VacantEntry<'x, Value>)
An occupied Entry
Methods
impl<'x, Value> Entry<'x, Value>
[src]
fn get(self) -> Result<&'x mut Value, VacantEntry<'x, Value>>
[src]
Gets a mut reference to the value in the entry or Err in case for Vacant.
fn or_insert(self, default: Value) -> &'x mut Value
[src]
Ensures a value is in the entry by inserting the default if empty, and returns a mutable reference to the value in the entry.
fn or_insert_with<F: FnOnce() -> Value>(self, default: F) -> &'x mut Value
[src]
Ensures a value is in the entry by inserting the result of the default function if empty, and returns a mutable reference to the value in the entry.