Trait HashMapExt

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

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

This trait extends the HashMap type, enabling it to use the HashMapFormer interface directly. It allows for fluent, expressive construction and manipulation of hash maps, integrating seamlessly with the builder pattern provided by the former framework. It’s a convenience trait that simplifies creating configured hash map builders with default settings.

Required Methods§

Source

fn former() -> CollectionFormer<(K, E), HashMapDefinition<K, E>>

Initializes a builder pattern for HashMap using a default HashMapFormer.

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, E> HashMapExt<K, E> for HashMap<K, E>
where K: Eq + Hash,