Struct arc_swap::gen_lock::PrivateSharded [−][src]
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: Default> Default for PrivateSharded<S>
[src]
fn default() -> PrivateSharded<S>
[src]
impl<S: AsRef<[Shard]> + Default> LockStorage for PrivateSharded<S>
[src]
Auto Trait Implementations
impl<S> RefUnwindSafe for PrivateSharded<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for PrivateSharded<S> where
S: Send,
S: Send,
impl<S> Sync for PrivateSharded<S> where
S: Sync,
S: Sync,
impl<S> Unpin for PrivateSharded<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for PrivateSharded<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,