Skip to main content

oxilean_std/hashset/
oxihashset_pick_any_group.rs

1//! # OxiHashSet - pick_any_group Methods
2//!
3//! This module contains method implementations for `OxiHashSet`.
4//!
5//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
6
7use super::oxihashset_type::OxiHashSet;
8use std::hash::Hash;
9
10impl<T: Eq + Hash + Clone> OxiHashSet<T> {
11    /// Return an arbitrary element (useful for single-element sets).
12    pub fn pick_any(&self) -> Option<&T> {
13        self.inner.iter().next()
14    }
15}