[][src]Struct arc_swap::gen_lock::PrivateSharded

pub struct PrivateSharded<S> { /* fields omitted */ }

An alternative to PrivateUnsharded, but with configurable number of shards.

The PrivateUnsharded is almost identical to PrivateSharded<[Shard; 1]> (the implementation takes advantage of some details to avoid a little bit of overhead). It allows the user to choose the trade-of between contention during locking and size of the pointer and speed during writes.

Note on AsRef<[Shard]>

Rust provides the AsRef trait (or, actually any trait) up to arrays of 32 elements. If you need something bigger, you have to work around it with a newtype.

Trait Implementations

impl<S: AsRef<[Shard]> + Default> LockStorage for PrivateSharded<S>[src]

type Shards = S

The type for keeping several shards. Read more

impl<S: Default> Default for PrivateSharded<S>[src]

Auto Trait Implementations

impl<S> Send for PrivateSharded<S> where
    S: Send

impl<S> Sync for PrivateSharded<S> where
    S: Sync

impl<S> Unpin for PrivateSharded<S> where
    S: Unpin

impl<S> UnwindSafe for PrivateSharded<S> where
    S: UnwindSafe

impl<S> RefUnwindSafe for PrivateSharded<S> where
    S: RefUnwindSafe

Blanket Implementations

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

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

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]