HashCollectionExt

Trait HashCollectionExt 

Source
pub trait HashCollectionExt {
    // Required methods
    fn new() -> Self;
    fn with_capacity(capacity: usize) -> Self;
}

Required Methods§

Source

fn new() -> Self

Returns a new collection with default capacity, using S::default() to build the hasher.

Source

fn with_capacity(capacity: usize) -> Self

Returns a new collection with capacity, using S::default() to build the hasher.

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.

Implementations on Foreign Types§

Source§

impl<K, S: BuildHasher + Default> HashCollectionExt for HashSet<K, S>

Source§

fn new() -> Self

Source§

fn with_capacity(capacity: usize) -> Self

Source§

impl<K, V, S: BuildHasher + Default> HashCollectionExt for HashMap<K, V, S>

Source§

fn new() -> Self

Source§

fn with_capacity(capacity: usize) -> Self

Implementors§