HashSet::is_empty
pub fn is_empty() -> bool Import
Source: use collections::set::{HashSet}; src/collections/set.hy Returns true when the set has no values.
Called on a HashSet value as value.is_empty(…).
Returns#
bool
See also#
HashSet: A set of unique values.HashSet::with_capacity: Create a set with bucket count rounded up to the next power of two (min 8).HashSet::new: Empty set with default capacity 8.HashSet::size: Number of elements.HashSet::clear: Remove all elements.HashSet::insert: Insertx; returnstruewhen newly added.HashSet::contains: True whenxis present.HashSet::remove: Removex; returnstruewhen an element was removed.