[][src]Struct rustc_data_structures::sharded::Sharded

pub struct Sharded<T> { /* fields omitted */ }

An array of cache-line aligned inner locked structures with convenience methods.

Methods

impl<T> Sharded<T>[src]

pub fn get_shard_by_value<K: Hash + ?Sized>(&self, val: &K) -> &Lock<T>[src]

pub fn get_shard_by_hash(&self, hash: u64) -> &Lock<T>[src]

pub fn lock_shards(&self) -> Vec<LockGuard<T>>[src]

pub fn try_lock_shards(&self) -> Option<Vec<LockGuard<T>>>[src]

Trait Implementations

impl<T: Default> Default for Sharded<T>[src]

impl<T: Clone> Clone for Sharded<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> Send for Sharded<T> where
    T: Send

impl<T> Unpin for Sharded<T> where
    T: Unpin

impl<T> !Sync for Sharded<T>

impl<T> UnwindSafe for Sharded<T> where
    T: UnwindSafe

impl<T> !RefUnwindSafe for Sharded<T>

Blanket Implementations

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<E> SpecializationError for E[src]