TreeMap::clear
pub fn clear() Import
Source: use collections::tree::{TreeMap}; src/collections/tree.hy Removes every entry.
Called on a TreeMap value as value.clear(…).
Contracts#
Checked according to --contracts (see Contracts).
ensures self.len == 0
See also#
TreeMap: An ordered map from keys of typeKto values of typeV.TreeMap::new: Creates an empty map.TreeMap::empty: Creates an empty map; the same asTreeMap::new.TreeMap::size: Returns the number of entries.TreeMap::is_empty: Returnstruewhen the map has no entries.TreeMap::iter: Returns an iterator over the entries in ascending key order.TreeMap::insert: Storesvunderk, replacing any value already there.TreeMap::contains: Returnstruewhen the map has an entry fork.