Trait HashSetExt

Source
pub trait HashSetExt<K>: Sealed
where K: Eq + Hash,
{ // Required method fn former() -> CollectionFormer<K, HashSetDefinition<K>>; }
Expand description

Provides an extension method for HashSet to facilitate the use of the builder pattern.

This trait extends HashSet, enabling direct use of the HashSetFormer interface for fluent and expressive set construction. It simplifies the process of building HashSet instances by providing a straightforward way to start the builder pattern with default context and termination behavior.

Required Methods§

Source

fn former() -> CollectionFormer<K, HashSetDefinition<K>>

Initializes a builder pattern for HashSet using a default HashSetFormer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<K> HashSetExt<K> for HashSet<K>
where K: Eq + Hash,