Struct dashmap::SharedValue
source · [−]#[repr(transparent)]pub struct SharedValue<T> { /* private fields */ }
Expand description
A simple wrapper around T
This is to prevent UB when using HashMap::get_key_value
, because
HashMap
doesn’t expose an api to get the key and value, where
the value is a &mut T
.
See #10 for details
This type is meant to be an implementation detail, but must be exposed due to the Dashmap::shards
Implementations
Trait Implementations
sourceimpl<T: Clone> Clone for SharedValue<T>
impl<T: Clone> Clone for SharedValue<T>
impl<T: Send> Send for SharedValue<T>
impl<T: Sync> Sync for SharedValue<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for SharedValue<T>
impl<T> Unpin for SharedValue<T> where
T: Unpin,
impl<T> UnwindSafe for SharedValue<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more