oxilean_std/hashset/oxihashset_fold_group.rs
1//! # OxiHashSet - fold_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 /// Fold over all elements with a given initial value.
12 pub fn fold<B, F: Fn(B, &T) -> B>(&self, init: B, f: F) -> B {
13 self.inner.iter().fold(init, f)
14 }
15}