# Crate Documentation **Version:** 6.1.0 **Format Version:** 57 # Module `dashmap` ## Modules ## Module `iter` ```rust pub mod iter { /* ... */ } ``` ### Types #### Struct `OwningIter` Iterator over a DashMap yielding key value pairs. # Examples ``` use dashmap::DashMap; let map = DashMap::new(); map.insert("hello", "world"); map.insert("alex", "steve"); let pairs: Vec<(&'static str, &'static str)> = map.into_iter().collect(); assert_eq!(pairs.len(), 2); ``` ```rust pub struct OwningIter { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoIterator** - ```rust fn into_iter(self: Self) -> I { /* ... */ } ``` - **Iterator** - ```rust fn next(self: &mut Self) -> Option<::Item> { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `Iter` Iterator over a DashMap yielding immutable references. # Examples ``` use dashmap::DashMap; let map = DashMap::new(); map.insert("hello", "world"); assert_eq!(map.iter().count(), 1); ``` ```rust pub struct Iter<''a, K, V, S = std::collections::hash_map::RandomState, M = crate::DashMap> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Clone** - ```rust fn clone(self: &Self) -> Self { /* ... */ } ``` - **CloneToUninit** - ```rust unsafe fn clone_to_uninit(self: &Self, dest: *mut u8) { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoIterator** - ```rust fn into_iter(self: Self) -> I { /* ... */ } ``` - **Iterator** - ```rust fn next(self: &mut Self) -> Option<::Item> { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **ToOwned** - ```rust fn to_owned(self: &Self) -> T { /* ... */ } ``` - ```rust fn clone_into(self: &Self, target: &mut T) { /* ... */ } ``` - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `IterMut` Iterator over a DashMap yielding mutable references. # Examples ``` use dashmap::DashMap; let map = DashMap::new(); map.insert("Johnny", 21); map.iter_mut().for_each(|mut r| *r += 1); assert_eq!(*map.get("Johnny").unwrap(), 22); ``` ```rust pub struct IterMut<''a, K, V, S = std::collections::hash_map::RandomState, M = crate::DashMap> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoIterator** - ```rust fn into_iter(self: Self) -> I { /* ... */ } ``` - **Iterator** - ```rust fn next(self: &mut Self) -> Option<::Item> { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Module `iter_set` ```rust pub mod iter_set { /* ... */ } ``` ### Types #### Struct `OwningIter` ```rust pub struct OwningIter { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoIterator** - ```rust fn into_iter(self: Self) -> I { /* ... */ } ``` - **Iterator** - ```rust fn next(self: &mut Self) -> Option<::Item> { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `Iter` ```rust pub struct Iter<''a, K, S, M> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoIterator** - ```rust fn into_iter(self: Self) -> I { /* ... */ } ``` - **Iterator** - ```rust fn next(self: &mut Self) -> Option<::Item> { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Module `mapref` ```rust pub mod mapref { /* ... */ } ``` ### Modules ## Module `entry` ```rust pub mod entry { /* ... */ } ``` ### Types #### Enum `Entry` ```rust pub enum Entry<''a, K, V> { Occupied(OccupiedEntry<''a, K, V>), Vacant(VacantEntry<''a, K, V>), } ``` ##### Variants ###### `Occupied` Fields: | Index | Type | Documentation | |-------|------|---------------| | 0 | `OccupiedEntry<''a, K, V>` | | ###### `Vacant` Fields: | Index | Type | Documentation | |-------|------|---------------| | 0 | `VacantEntry<''a, K, V>` | | ##### Implementations ###### Methods - ```rust pub fn and_modify(self: Self, f: impl FnOnce(&mut V)) -> Self { /* ... */ } ``` Apply a function to the stored value if it exists. - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` Get the key of the entry. - ```rust pub fn into_key(self: Self) -> K { /* ... */ } ``` Into the key of the entry. - ```rust pub fn or_default(self: Self) -> RefMut<''a, K, V> where V: Default { /* ... */ } ``` Return a mutable reference to the element if it exists, - ```rust pub fn or_insert(self: Self, value: V) -> RefMut<''a, K, V> { /* ... */ } ``` Return a mutable reference to the element if it exists, - ```rust pub fn or_insert_with V: FnOnce() -> V>(self: Self, value: impl FnOnce() -> V) -> RefMut<''a, K, V> { /* ... */ } ``` Return a mutable reference to the element if it exists, - ```rust pub fn or_try_insert_with Result: FnOnce() -> Result>(self: Self, value: impl FnOnce() -> Result) -> Result, E> { /* ... */ } ``` - ```rust pub fn insert(self: Self, value: V) -> RefMut<''a, K, V> { /* ... */ } ``` Sets the value of the entry, and returns a reference to the inserted value. - ```rust pub fn insert_entry(self: Self, value: V) -> OccupiedEntry<''a, K, V> where K: Clone { /* ... */ } ``` Sets the value of the entry, and returns an OccupiedEntry. ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `VacantEntry` ```rust pub struct VacantEntry<''a, K, V> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Methods - ```rust pub fn insert(self: Self, value: V) -> RefMut<''a, K, V> { /* ... */ } ``` - ```rust pub fn insert_entry(self: Self, value: V) -> OccupiedEntry<''a, K, V> where K: Clone { /* ... */ } ``` Sets the value of the entry with the VacantEntry’s key, and returns an OccupiedEntry. - ```rust pub fn into_key(self: Self) -> K { /* ... */ } ``` - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `OccupiedEntry` ```rust pub struct OccupiedEntry<''a, K, V> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Methods - ```rust pub fn get(self: &Self) -> &V { /* ... */ } ``` - ```rust pub fn get_mut(self: &mut Self) -> &mut V { /* ... */ } ``` - ```rust pub fn insert(self: &mut Self, value: V) -> V { /* ... */ } ``` - ```rust pub fn into_ref(self: Self) -> RefMut<''a, K, V> { /* ... */ } ``` - ```rust pub fn into_key(self: Self) -> K { /* ... */ } ``` - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` - ```rust pub fn remove(self: Self) -> V { /* ... */ } ``` - ```rust pub fn remove_entry(self: Self) -> (K, V) { /* ... */ } ``` - ```rust pub fn replace_entry(self: Self, value: V) -> (K, V) { /* ... */ } ``` ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Module `multiple` ```rust pub mod multiple { /* ... */ } ``` ### Types #### Struct `RefMulti` ```rust pub struct RefMulti<''a, K, V> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Methods - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` - ```rust pub fn value(self: &Self) -> &V { /* ... */ } ``` - ```rust pub fn pair(self: &Self) -> (&K, &V) { /* ... */ } ``` ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Deref** - ```rust fn deref(self: &Self) -> &V { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **Receiver** - **RefUnwindSafe** - **Send** - **Serialize** - ```rust fn serialize(self: &Self, serializer: Ser) -> Result<::Ok, ::Error> where Ser: serde::Serializer { /* ... */ } ``` - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `RefMutMulti` ```rust pub struct RefMutMulti<''a, K, V> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Methods - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` - ```rust pub fn value(self: &Self) -> &V { /* ... */ } ``` - ```rust pub fn value_mut(self: &mut Self) -> &mut V { /* ... */ } ``` - ```rust pub fn pair(self: &Self) -> (&K, &V) { /* ... */ } ``` - ```rust pub fn pair_mut(self: &mut Self) -> (&K, &mut V) { /* ... */ } ``` ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Deref** - ```rust fn deref(self: &Self) -> &V { /* ... */ } ``` - **DerefMut** - ```rust fn deref_mut(self: &mut Self) -> &mut V { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **Receiver** - **RefUnwindSafe** - **Send** - **Serialize** - ```rust fn serialize(self: &Self, serializer: Ser) -> Result<::Ok, ::Error> where Ser: serde::Serializer { /* ... */ } ``` - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Module `one` ```rust pub mod one { /* ... */ } ``` ### Types #### Struct `Ref` ```rust pub struct Ref<''a, K, V> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Methods - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` - ```rust pub fn value(self: &Self) -> &V { /* ... */ } ``` - ```rust pub fn pair(self: &Self) -> (&K, &V) { /* ... */ } ``` - ```rust pub fn map(self: Self, f: F) -> MappedRef<''a, K, V, T> where F: FnOnce(&V) -> &T { /* ... */ } ``` - ```rust pub fn try_map(self: Self, f: F) -> Result, Self> where F: FnOnce(&V) -> Option<&T> { /* ... */ } ``` ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Debug** - ```rust fn fmt(self: &Self, f: &mut Formatter<''_>) -> std::fmt::Result { /* ... */ } ``` - **Deref** - ```rust fn deref(self: &Self) -> &V { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **Receiver** - **RefUnwindSafe** - **Send** - **Serialize** - ```rust fn serialize(self: &Self, serializer: Ser) -> Result<::Ok, ::Error> where Ser: serde::Serializer { /* ... */ } ``` - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `RefMut` ```rust pub struct RefMut<''a, K, V> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Methods - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` - ```rust pub fn value(self: &Self) -> &V { /* ... */ } ``` - ```rust pub fn value_mut(self: &mut Self) -> &mut V { /* ... */ } ``` - ```rust pub fn pair(self: &Self) -> (&K, &V) { /* ... */ } ``` - ```rust pub fn pair_mut(self: &mut Self) -> (&K, &mut V) { /* ... */ } ``` - ```rust pub fn downgrade(self: Self) -> Ref<''a, K, V> { /* ... */ } ``` - ```rust pub fn map(self: Self, f: F) -> MappedRefMut<''a, K, V, T> where F: FnOnce(&mut V) -> &mut T { /* ... */ } ``` - ```rust pub fn try_map(self: Self, f: F) -> Result, Self> where F: FnOnce(&mut V) -> Option<&mut T> { /* ... */ } ``` ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Debug** - ```rust fn fmt(self: &Self, f: &mut Formatter<''_>) -> std::fmt::Result { /* ... */ } ``` - **Deref** - ```rust fn deref(self: &Self) -> &V { /* ... */ } ``` - **DerefMut** - ```rust fn deref_mut(self: &mut Self) -> &mut V { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **Receiver** - **RefUnwindSafe** - **Send** - **Serialize** - ```rust fn serialize(self: &Self, serializer: Ser) -> Result<::Ok, ::Error> where Ser: serde::Serializer { /* ... */ } ``` - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `MappedRef` ```rust pub struct MappedRef<''a, K, V, T> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Methods - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` - ```rust pub fn value(self: &Self) -> &T { /* ... */ } ``` - ```rust pub fn pair(self: &Self) -> (&K, &T) { /* ... */ } ``` - ```rust pub fn map(self: Self, f: F) -> MappedRef<''a, K, V, T2> where F: FnOnce(&T) -> &T2 { /* ... */ } ``` - ```rust pub fn try_map(self: Self, f: F) -> Result, Self> where F: FnOnce(&T) -> Option<&T2> { /* ... */ } ``` ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **AsRef** - ```rust fn as_ref(self: &Self) -> &TDeref { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Debug** - ```rust fn fmt(self: &Self, f: &mut Formatter<''_>) -> std::fmt::Result { /* ... */ } ``` - **Deref** - ```rust fn deref(self: &Self) -> &T { /* ... */ } ``` - **Display** - ```rust fn fmt(self: &Self, f: &mut std::fmt::Formatter<''_>) -> std::fmt::Result { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **Receiver** - **RefUnwindSafe** - **Send** - **Serialize** - ```rust fn serialize(self: &Self, serializer: Ser) -> Result<::Ok, ::Error> where Ser: serde::Serializer { /* ... */ } ``` - **Sync** - **ToString** - ```rust fn to_string(self: &Self) -> String { /* ... */ } ``` - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `MappedRefMut` ```rust pub struct MappedRefMut<''a, K, V, T> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Methods - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` - ```rust pub fn value(self: &Self) -> &T { /* ... */ } ``` - ```rust pub fn value_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - ```rust pub fn pair(self: &Self) -> (&K, &T) { /* ... */ } ``` - ```rust pub fn pair_mut(self: &mut Self) -> (&K, &mut T) { /* ... */ } ``` - ```rust pub fn map(self: Self, f: F) -> MappedRefMut<''a, K, V, T2> where F: FnOnce(&mut T) -> &mut T2 { /* ... */ } ``` - ```rust pub fn try_map(self: Self, f: F) -> Result, Self> where F: FnOnce(&mut T) -> Option<&mut T2> { /* ... */ } ``` ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Debug** - ```rust fn fmt(self: &Self, f: &mut Formatter<''_>) -> std::fmt::Result { /* ... */ } ``` - **Deref** - ```rust fn deref(self: &Self) -> &T { /* ... */ } ``` - **DerefMut** - ```rust fn deref_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **Receiver** - **RefUnwindSafe** - **Send** - **Serialize** - ```rust fn serialize(self: &Self, serializer: Ser) -> Result<::Ok, ::Error> where Ser: serde::Serializer { /* ... */ } ``` - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Module `setref` ```rust pub mod setref { /* ... */ } ``` ### Modules ## Module `multiple` ```rust pub mod multiple { /* ... */ } ``` ### Types #### Struct `RefMulti` ```rust pub struct RefMulti<''a, K> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Methods - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Deref** - ```rust fn deref(self: &Self) -> &K { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **Receiver** - **RefUnwindSafe** - **Send** - **Serialize** - ```rust fn serialize(self: &Self, serializer: Ser) -> Result<::Ok, ::Error> where Ser: serde::Serializer { /* ... */ } ``` - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Module `one` ```rust pub mod one { /* ... */ } ``` ### Types #### Struct `Ref` ```rust pub struct Ref<''a, K> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Methods - ```rust pub fn key(self: &Self) -> &K { /* ... */ } ``` ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Deref** - ```rust fn deref(self: &Self) -> &K { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **Receiver** - **RefUnwindSafe** - **Send** - **Serialize** - ```rust fn serialize(self: &Self, serializer: Ser) -> Result<::Ok, ::Error> where Ser: serde::Serializer { /* ... */ } ``` - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Module `try_result` ```rust pub mod try_result { /* ... */ } ``` ### Types #### Enum `TryResult` Represents the result of a non-blocking read from a [DashMap](crate::DashMap). ```rust pub enum TryResult { Present(R), Absent, Locked, } ``` ##### Variants ###### `Present` The value was present in the map, and the lock for the shard was successfully obtained. Fields: | Index | Type | Documentation | |-------|------|---------------| | 0 | `R` | | ###### `Absent` The shard wasn't locked, and the value wasn't present in the map. ###### `Locked` The shard was locked. ##### Implementations ###### Methods - ```rust pub fn is_present(self: &Self) -> bool { /* ... */ } ``` Returns `true` if the value was present in the map, and the lock for the shard was successfully obtained. - ```rust pub fn is_absent(self: &Self) -> bool { /* ... */ } ``` Returns `true` if the shard wasn't locked, and the value wasn't present in the map. - ```rust pub fn is_locked(self: &Self) -> bool { /* ... */ } ``` Returns `true` if the shard was locked. - ```rust pub fn unwrap(self: Self) -> R { /* ... */ } ``` If `self` is [Present](TryResult::Present), returns the reference to the value in the map. - ```rust pub fn try_unwrap(self: Self) -> Option { /* ... */ } ``` If `self` is [Present](TryResult::Present), returns the reference to the value in the map. ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Debug** - ```rust fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<''_>) -> $crate::fmt::Result { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Module `rayon` **Attributes:** - `Other("#[(feature = \"rayon\")]")` ```rust pub mod rayon { /* ... */ } ``` ### Modules ## Module `map` ```rust pub mod map { /* ... */ } ``` ### Types #### Struct `OwningIter` ```rust pub struct OwningIter { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoParallelIterator** - ```rust fn into_par_iter(self: Self) -> T { /* ... */ } ``` - **ParallelIterator** - ```rust fn drive_unindexed(self: Self, consumer: C) -> ::Result where C: UnindexedConsumer<::Item> { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `Iter` ```rust pub struct Iter<''a, K, V> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoParallelIterator** - ```rust fn into_par_iter(self: Self) -> T { /* ... */ } ``` - **ParallelIterator** - ```rust fn drive_unindexed(self: Self, consumer: C) -> ::Result where C: UnindexedConsumer<::Item> { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `IterMut` ```rust pub struct IterMut<''a, K, V> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoParallelIterator** - ```rust fn into_par_iter(self: Self) -> T { /* ... */ } ``` - **ParallelIterator** - ```rust fn drive_unindexed(self: Self, consumer: C) -> ::Result where C: UnindexedConsumer<::Item> { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Module `read_only` ```rust pub mod read_only { /* ... */ } ``` ## Module `set` ```rust pub mod set { /* ... */ } ``` ### Types #### Struct `OwningIter` ```rust pub struct OwningIter { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoParallelIterator** - ```rust fn into_par_iter(self: Self) -> T { /* ... */ } ``` - **ParallelIterator** - ```rust fn drive_unindexed(self: Self, consumer: C) -> ::Result where C: UnindexedConsumer<::Item> { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** #### Struct `Iter` ```rust pub struct Iter<''a, K> { // Some fields omitted } ``` ##### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | ##### Implementations ###### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoParallelIterator** - ```rust fn into_par_iter(self: Self) -> T { /* ... */ } ``` - **ParallelIterator** - ```rust fn drive_unindexed(self: Self, consumer: C) -> ::Result where C: UnindexedConsumer<::Item> { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Sync** - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Types ### Struct `TryReserveError` **Attributes:** - `NonExhaustive` ```rust pub struct TryReserveError { } ``` #### Fields | Name | Type | Documentation | |------|------|---------------| #### Implementations ##### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Clone** - ```rust fn clone(self: &Self) -> TryReserveError { /* ... */ } ``` - **CloneToUninit** - ```rust unsafe fn clone_to_uninit(self: &Self, dest: *mut u8) { /* ... */ } ``` - **Debug** - ```rust fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<''_>) -> $crate::fmt::Result { /* ... */ } ``` - **Eq** - **Equivalent** - ```rust fn equivalent(self: &Self, key: &K) -> bool { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **PartialEq** - ```rust fn eq(self: &Self, other: &TryReserveError) -> bool { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **StructuralPartialEq** - **Sync** - **ToOwned** - ```rust fn to_owned(self: &Self) -> T { /* ... */ } ``` - ```rust fn clone_into(self: &Self, target: &mut T) { /* ... */ } ``` - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ### Struct `DashMap` DashMap is an implementation of a concurrent associative array/hashmap in Rust. DashMap tries to implement an easy to use API similar to `std::collections::HashMap` with some slight changes to handle concurrency. DashMap tries to be very simple to use and to be a direct replacement for `RwLock>`. To accomplish this, all methods take `&self` instead of modifying methods taking `&mut self`. This allows you to put a DashMap in an `Arc` and share it between threads while being able to modify it. Documentation mentioning locking behaviour acts in the reference frame of the calling thread. This means that it is safe to ignore it across multiple threads. ```rust pub struct DashMap { // Some fields omitted } ``` #### Fields | Name | Type | Documentation | |------|------|---------------| | *private fields* | ... | *Some fields have been omitted* | #### Implementations ##### Methods - ```rust pub fn par_iter_mut(self: &Self) -> IterMut<''_, K, V> { /* ... */ } ``` - ```rust pub fn new() -> Self { /* ... */ } ``` Creates a new DashMap with a capacity of 0. - ```rust pub fn with_capacity(capacity: usize) -> Self { /* ... */ } ``` Creates a new DashMap with a specified starting capacity. - ```rust pub fn with_shard_amount(shard_amount: usize) -> Self { /* ... */ } ``` Creates a new DashMap with a specified shard amount - ```rust pub fn with_capacity_and_shard_amount(capacity: usize, shard_amount: usize) -> Self { /* ... */ } ``` Creates a new DashMap with a specified capacity and shard amount. - ```rust pub fn into_read_only(self: Self) -> ReadOnlyView { /* ... */ } ``` Wraps this `DashMap` into a read-only view. This view allows to obtain raw references to the stored values. - ```rust pub fn with_hasher(hasher: S) -> Self { /* ... */ } ``` Creates a new DashMap with a capacity of 0 and the provided hasher. - ```rust pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> Self { /* ... */ } ``` Creates a new DashMap with a specified starting capacity and hasher. - ```rust pub fn with_hasher_and_shard_amount(hasher: S, shard_amount: usize) -> Self { /* ... */ } ``` Creates a new DashMap with a specified hasher and shard amount - ```rust pub fn with_capacity_and_hasher_and_shard_amount(capacity: usize, hasher: S, shard_amount: usize) -> Self { /* ... */ } ``` Creates a new DashMap with a specified starting capacity, hasher and shard_amount. - ```rust pub fn hash_usize(self: &Self, item: &T) -> usize { /* ... */ } ``` Hash a given item to produce a usize. - ```rust pub fn shards(self: &Self) -> &[CachePadded)>>>] { /* ... */ } ``` Allows you to peek at the inner shards that store your data. - ```rust pub fn shards_mut(self: &mut Self) -> &mut [CachePadded)>>>] { /* ... */ } ``` Provides mutable access to the inner shards that store your data. - ```rust pub fn into_shards(self: Self) -> Box<[CachePadded)>>>]> { /* ... */ } ``` Consumes this `DashMap` and returns the inner shards. - ```rust pub fn determine_map(self: &Self, key: &Q) -> usize where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` Finds which shard a certain key is stored in. - ```rust pub fn determine_shard(self: &Self, hash: usize) -> usize { /* ... */ } ``` Finds which shard a certain hash is stored in. - ```rust pub fn hasher(self: &Self) -> &S { /* ... */ } ``` Returns a reference to the map's [`BuildHasher`]. - ```rust pub fn insert(self: &Self, key: K, value: V) -> Option { /* ... */ } ``` Inserts a key and a value into the map. Returns the old value associated with the key if there was one. - ```rust pub fn remove(self: &Self, key: &Q) -> Option<(K, V)> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` Removes an entry from the map, returning the key and value if they existed in the map. - ```rust pub fn remove_if bool: FnOnce(&K, &V) -> bool>(self: &Self, key: &Q, f: impl FnOnce(&K, &V) -> bool) -> Option<(K, V)> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` Removes an entry from the map, returning the key and value - ```rust pub fn remove_if_mut bool: FnOnce(&K, &mut V) -> bool>(self: &Self, key: &Q, f: impl FnOnce(&K, &mut V) -> bool) -> Option<(K, V)> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` - ```rust pub fn iter(self: &''a Self) -> Iter<''a, K, V, S, DashMap> { /* ... */ } ``` Creates an iterator over a DashMap yielding immutable references. - ```rust pub fn iter_mut(self: &''a Self) -> IterMut<''a, K, V, S, DashMap> { /* ... */ } ``` Iterator over a DashMap yielding mutable references. - ```rust pub fn get(self: &''a Self, key: &Q) -> Option> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` Get an immutable reference to an entry in the map - ```rust pub fn get_mut(self: &''a Self, key: &Q) -> Option> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` Get a mutable reference to an entry in the map - ```rust pub fn try_get(self: &''a Self, key: &Q) -> TryResult> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` Get an immutable reference to an entry in the map, if the shard is not locked. - ```rust pub fn try_get_mut(self: &''a Self, key: &Q) -> TryResult> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` Get a mutable reference to an entry in the map, if the shard is not locked. - ```rust pub fn shrink_to_fit(self: &Self) { /* ... */ } ``` Remove excess capacity to reduce memory usage. - ```rust pub fn retain bool: FnMut(&K, &mut V) -> bool>(self: &Self, f: impl FnMut(&K, &mut V) -> bool) { /* ... */ } ``` Retain elements that whose predicates return true - ```rust pub fn len(self: &Self) -> usize { /* ... */ } ``` Fetches the total number of key-value pairs stored in the map. - ```rust pub fn is_empty(self: &Self) -> bool { /* ... */ } ``` Checks if the map is empty or not. - ```rust pub fn clear(self: &Self) { /* ... */ } ``` Removes all key-value pairs in the map. - ```rust pub fn capacity(self: &Self) -> usize { /* ... */ } ``` Returns how many key-value pairs the map can store without reallocating. - ```rust pub fn alter V: FnOnce(&K, V) -> V>(self: &Self, key: &Q, f: impl FnOnce(&K, V) -> V) where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` Modify a specific value according to a function. - ```rust pub fn alter_all V: FnMut(&K, V) -> V>(self: &Self, f: impl FnMut(&K, V) -> V) { /* ... */ } ``` Modify every value in the map according to a function. - ```rust pub fn view R: FnOnce(&K, &V) -> R>(self: &Self, key: &Q, f: impl FnOnce(&K, &V) -> R) -> Option where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` Scoped access into an item of the map according to a function. - ```rust pub fn contains_key(self: &Self, key: &Q) -> bool where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` Checks if the map contains a specific key. - ```rust pub fn entry(self: &''a Self, key: K) -> Entry<''a, K, V> { /* ... */ } ``` Advanced entry API that tries to mimic `std::collections::HashMap`. - ```rust pub fn try_entry(self: &''a Self, key: K) -> Option> { /* ... */ } ``` Advanced entry API that tries to mimic `std::collections::HashMap`. - ```rust pub fn try_reserve(self: &mut Self, additional: usize) -> Result<(), TryReserveError> { /* ... */ } ``` Advanced entry API that tries to mimic `std::collections::HashMap::try_reserve`. ##### Trait Implementations - **Any** - ```rust fn type_id(self: &Self) -> TypeId { /* ... */ } ``` - **BitAnd** - ```rust fn bitand(self: Self, key: &Q) -> ::Output { /* ... */ } ``` - **BitOr** - ```rust fn bitor(self: Self, key: &Q) -> ::Output { /* ... */ } ``` - **Borrow** - ```rust fn borrow(self: &Self) -> &T { /* ... */ } ``` - **BorrowMut** - ```rust fn borrow_mut(self: &mut Self) -> &mut T { /* ... */ } ``` - **Clone** - ```rust fn clone(self: &Self) -> Self { /* ... */ } ``` - **CloneToUninit** - ```rust unsafe fn clone_to_uninit(self: &Self, dest: *mut u8) { /* ... */ } ``` - **Debug** - ```rust fn fmt(self: &Self, f: &mut fmt::Formatter<''_>) -> fmt::Result { /* ... */ } ``` - **Default** - ```rust fn default() -> Self { /* ... */ } ``` - **Deserialize** - ```rust fn deserialize(deserializer: D) -> Result::Error> where D: Deserializer<''de> { /* ... */ } ``` - **DeserializeOwned** - **Extend** - ```rust fn extend>(self: &mut Self, intoiter: I) { /* ... */ } ``` - **Freeze** - **From** - ```rust fn from(t: T) -> T { /* ... */ } ``` Returns the argument unchanged. - **FromIterator** - ```rust fn from_iter>(intoiter: I) -> Self { /* ... */ } ``` - **FromParallelIterator** - ```rust fn from_par_iter(par_iter: I) -> Self where I: IntoParallelIterator { /* ... */ } ``` - **Into** - ```rust fn into(self: Self) -> U { /* ... */ } ``` Calls `U::from(self)`. - **IntoEither** - **IntoIterator** - ```rust fn into_iter(self: Self) -> ::IntoIter { /* ... */ } ``` - ```rust fn into_iter(self: Self) -> ::IntoIter { /* ... */ } ``` - **IntoParallelIterator** - ```rust fn into_par_iter(self: Self) -> ::Iter { /* ... */ } ``` - ```rust fn into_par_iter(self: Self) -> ::Iter { /* ... */ } ``` - ```rust fn into_par_iter(self: Self) -> ::Iter { /* ... */ } ``` - **IntoParallelRefIterator** - ```rust fn par_iter(self: &''data Self) -> >::Iter { /* ... */ } ``` - **IntoParallelRefMutIterator** - ```rust fn par_iter_mut(self: &''data mut Self) -> >::Iter { /* ... */ } ``` - **Map** - ```rust fn _shard_count(self: &Self) -> usize { /* ... */ } ``` - ```rust unsafe fn _get_read_shard(self: &''a Self, i: usize) -> &''a hashbrown::raw::RawTable<(K, SharedValue)> { /* ... */ } ``` - ```rust unsafe fn _yield_read_shard(self: &''a Self, i: usize) -> RwLockReadGuard<''a, hashbrown::raw::RawTable<(K, SharedValue)>> { /* ... */ } ``` - ```rust unsafe fn _yield_write_shard(self: &''a Self, i: usize) -> RwLockWriteGuard<''a, hashbrown::raw::RawTable<(K, SharedValue)>> { /* ... */ } ``` - ```rust unsafe fn _try_yield_read_shard(self: &''a Self, i: usize) -> Option)>>> { /* ... */ } ``` - ```rust unsafe fn _try_yield_write_shard(self: &''a Self, i: usize) -> Option)>>> { /* ... */ } ``` - ```rust fn _insert(self: &Self, key: K, value: V) -> Option { /* ... */ } ``` - ```rust fn _remove(self: &Self, key: &Q) -> Option<(K, V)> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` - ```rust fn _remove_if bool: FnOnce(&K, &V) -> bool>(self: &Self, key: &Q, f: impl FnOnce(&K, &V) -> bool) -> Option<(K, V)> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` - ```rust fn _remove_if_mut bool: FnOnce(&K, &mut V) -> bool>(self: &Self, key: &Q, f: impl FnOnce(&K, &mut V) -> bool) -> Option<(K, V)> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` - ```rust fn _iter(self: &''a Self) -> Iter<''a, K, V, S, DashMap> { /* ... */ } ``` - ```rust fn _iter_mut(self: &''a Self) -> IterMut<''a, K, V, S, DashMap> { /* ... */ } ``` - ```rust fn _get(self: &''a Self, key: &Q) -> Option> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` - ```rust fn _get_mut(self: &''a Self, key: &Q) -> Option> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` - ```rust fn _try_get(self: &''a Self, key: &Q) -> TryResult> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` - ```rust fn _try_get_mut(self: &''a Self, key: &Q) -> TryResult> where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` - ```rust fn _shrink_to_fit(self: &Self) { /* ... */ } ``` - ```rust fn _retain bool: FnMut(&K, &mut V) -> bool>(self: &Self, f: impl FnMut(&K, &mut V) -> bool) { /* ... */ } ``` - ```rust fn _len(self: &Self) -> usize { /* ... */ } ``` - ```rust fn _capacity(self: &Self) -> usize { /* ... */ } ``` - ```rust fn _alter V: FnOnce(&K, V) -> V>(self: &Self, key: &Q, f: impl FnOnce(&K, V) -> V) where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` - ```rust fn _alter_all V: FnMut(&K, V) -> V>(self: &Self, f: impl FnMut(&K, V) -> V) { /* ... */ } ``` - ```rust fn _view R: FnOnce(&K, &V) -> R>(self: &Self, key: &Q, f: impl FnOnce(&K, &V) -> R) -> Option where K: Borrow, Q: Hash + Eq + ?Sized { /* ... */ } ``` - ```rust fn _entry(self: &''a Self, key: K) -> Entry<''a, K, V> { /* ... */ } ``` - ```rust fn _try_entry(self: &''a Self, key: K) -> Option> { /* ... */ } ``` - ```rust fn _hasher(self: &Self) -> S { /* ... */ } ``` - **ParallelExtend** - ```rust fn par_extend(self: &mut Self, par_iter: I) where I: IntoParallelIterator { /* ... */ } ``` - ```rust fn par_extend(self: &mut Self, par_iter: I) where I: IntoParallelIterator { /* ... */ } ``` - **Pointable** - ```rust unsafe fn init(init: ::Init) -> usize { /* ... */ } ``` - ```rust unsafe fn deref<''a>(ptr: usize) -> &''a T { /* ... */ } ``` - ```rust unsafe fn deref_mut<''a>(ptr: usize) -> &''a mut T { /* ... */ } ``` - ```rust unsafe fn drop(ptr: usize) { /* ... */ } ``` - **RefUnwindSafe** - **Send** - **Serialize** - ```rust fn serialize(self: &Self, serializer: S) -> Result<::Ok, ::Error> where S: Serializer { /* ... */ } ``` - **Shl** - ```rust fn shl(self: Self, pair: (K, V)) -> ::Output { /* ... */ } ``` - **Shr** - ```rust fn shr(self: Self, key: &Q) -> ::Output { /* ... */ } ``` - **Sub** - ```rust fn sub(self: Self, key: &Q) -> ::Output { /* ... */ } ``` - **Sync** - **ToOwned** - ```rust fn to_owned(self: &Self) -> T { /* ... */ } ``` - ```rust fn clone_into(self: &Self, target: &mut T) { /* ... */ } ``` - **TryFrom** - ```rust fn try_from(value: U) -> Result>::Error> { /* ... */ } ``` - **TryInto** - ```rust fn try_into(self: Self) -> Result>::Error> { /* ... */ } ``` - **Unpin** - **UnwindSafe** ## Re-exports ### Re-export `RawRwLock` **Attributes:** - `Other("#[(feature = \"raw-api\")]")` ```rust pub use crate::lock::RawRwLock; ``` ### Re-export `RwLock` **Attributes:** - `Other("#[(feature = \"raw-api\")]")` ```rust pub use crate::lock::RwLock; ``` ### Re-export `RwLockReadGuard` **Attributes:** - `Other("#[(feature = \"raw-api\")]")` ```rust pub use crate::lock::RwLockReadGuard; ``` ### Re-export `RwLockWriteGuard` **Attributes:** - `Other("#[(feature = \"raw-api\")]")` ```rust pub use crate::lock::RwLockWriteGuard; ``` ### Re-export `Entry` ```rust pub use mapref::entry::Entry; ``` ### Re-export `OccupiedEntry` ```rust pub use mapref::entry::OccupiedEntry; ``` ### Re-export `VacantEntry` ```rust pub use mapref::entry::VacantEntry; ``` ### Re-export `ReadOnlyView` ```rust pub use read_only::ReadOnlyView; ``` ### Re-export `DashSet` ```rust pub use set::DashSet; ``` ### Re-export `Map` ```rust pub use t::Map; ``` ### Re-export `SharedValue` ```rust pub use util::SharedValue; ```