im 8.0.0

Assorted immutable collection datatypes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::sync::Arc;
use std::collections::hash_map::RandomState;
use std::hash::BuildHasher;

lazy_static! {
    static ref DEFAULT_HASHER: Arc<RandomState> = Arc::new(RandomState::new());
}

pub trait SharedHasher: BuildHasher {
    fn shared_hasher() -> Arc<Self>;
}

impl SharedHasher for RandomState {
    #[inline]
    fn shared_hasher() -> Arc<Self> {
        DEFAULT_HASHER.clone()
    }
}