### get Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns a reference to the value corresponding to the key. ```APIDOC ## get ### Description Returns a reference to the value corresponding to the key. ### Method `get(&self, k: &Q) -> Option<&V>` ### Parameters - `self`: An immutable reference to the `LinkedHashMap`. - `k`: The key to search for. ### Type Parameters - `Q`: The type of the key to search for, which must be comparable to `K`. ### Returns An `Option` containing a reference to the value if the key is found, otherwise `None`. ``` -------------------------------- ### get Source: https://docs.rs/hashlink/0.11.0/hashlink/lru_cache/struct.LruCache.html Returns a reference to the value corresponding to the key, marking it as recently used. ```APIDOC ## get ### Description Retrieve the given key, marking it as recently used and moving it to the back of the LRU list. ### Signature ```rust pub fn get(&mut self, k: &Q) -> Option<&V> where K: Borrow, Q: Hash + Eq + ?Sized, ``` ``` -------------------------------- ### type_id Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.IntoIter.html Gets the `TypeId` of `self`. ```APIDOC #### fn type_id(&self) -> TypeId Gets the `TypeId` of `self`. Read more Source ``` -------------------------------- ### take Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Drain.html Creates an iterator that yields the first `n` elements. ```APIDOC ## fn take(self, n: usize) -> Take ### Description Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. ``` -------------------------------- ### CloneToUninit Implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Experimental API for cloning data to uninitialized memory. ```APIDOC ## clone_to_uninit(&self, dest: *mut u8) ### Description Performs copy-assignment from `self` to `dest`. ### Method `clone_to_uninit` ``` -------------------------------- ### type_id Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Keys.html Gets the `TypeId` of `self`. ```APIDOC #### fn type_id(&self) -> TypeId Gets the `TypeId` of `self`. Read more ``` -------------------------------- ### Constructor Methods Source: https://docs.rs/hashlink/0.11.0/src/hashlink/lru_cache.rs.html Methods for creating new LRU Cache instances with specified capacities and optional hash builders. ```APIDOC ## `new(capacity: usize) -> Self` ### Description Creates a new `LruCache` with the specified capacity. ### Method `new` ### Parameters - `capacity` (usize) - The maximum number of items the cache can hold. ``` ```APIDOC ## `new_unbounded() -> Self` ### Description Creates a new unbounded `LruCache` that does not automatically evict entries. This is equivalent to `LruCache::new(usize::MAX)`. ### Method `new_unbounded` ``` ```APIDOC ## `with_hasher(capacity: usize, hash_builder: S) -> Self` ### Description Creates a new `LruCache` with the specified capacity and a custom hash builder. ### Method `with_hasher` ### Parameters - `capacity` (usize) - The maximum number of items the cache can hold. - `hash_builder` (S) - The hash builder to use for key hashing. ``` -------------------------------- ### type_id Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.IterMut.html Gets the `TypeId` of `self`. ```APIDOC #### fn type_id(&self) -> TypeId Gets the `TypeId` of `self`. Read more Source§ ``` -------------------------------- ### try_from Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.IterMut.html Performs the conversion. ```APIDOC #### fn try_from(value: U) -> Result>::Error> Performs the conversion. Source§ ``` -------------------------------- ### type_id Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Iter.html Gets the `TypeId` of the iterator. ```APIDOC ## fn type_id(&self) -> TypeId ### Description Gets the `TypeId` of `self`. ### Parameters None ### Returns - `TypeId`: The unique identifier for the type of the iterator. ``` -------------------------------- ### try_from Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Keys.html Performs the conversion. ```APIDOC #### fn try_from(value: U) -> Result>::Error> Performs the conversion. ``` -------------------------------- ### new Source: https://docs.rs/hashlink/0.11.0/hashlink/lru_cache/struct.LruCache.html Creates a new LruCache with a specified capacity. Entries exceeding the capacity will be evicted based on LRU policy. ```APIDOC ## new ### Description Creates a new `LruCache` with a specified capacity. ### Signature ```rust pub fn new(capacity: usize) -> Self ``` ``` -------------------------------- ### Get the length of a LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Returns the number of elements in the LinkedHashSet. ```rust pub fn len(&self) -> usize ``` -------------------------------- ### Any Implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Provides runtime type information for LinkedHashMap. ```APIDOC ## type_id(&self) -> TypeId ### Description Gets the `TypeId` of `self`. ### Method `type_id` ``` -------------------------------- ### Get the capacity of a LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Returns the current capacity of the LinkedHashSet. ```rust pub fn capacity(&self) -> usize ``` -------------------------------- ### Into Implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Provides a way to convert a type into another type that can be created from it. ```APIDOC ## into(self) -> U ### Description Calls `U::from(self)`. ### Method `into` ``` -------------------------------- ### Get Hasher from LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_set.rs.html Returns a reference to the `BuildHasher` used by the LinkedHashSet. ```rust pub fn hasher(&self) -> &S { self.map.hasher() } ``` -------------------------------- ### Get Entry API Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Provides access to the entry API for a given key. This allows for conditional manipulation of map entries, such as inserting if vacant or modifying if occupied. ```rust pub fn entry(&mut self, key: K) -> Entry<'_, K, V, S> { match self.raw_entry_mut().from_key(&key) { RawEntryMut::Occupied(occupied) => Entry::Occupied(OccupiedEntry { key, raw_entry: occupied, }), RawEntryMut::Vacant(vacant) => Entry::Vacant(VacantEntry { key, raw_entry: vacant, }), } } ``` -------------------------------- ### Get the number of elements in LinkedHashMap Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns the number of elements in the map. ```rust pub fn len(&self) -> usize> ``` -------------------------------- ### Create New LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_set.rs.html Use `new()` for a default LinkedHashSet or `with_capacity()` to pre-allocate space. ```rust pub fn new() -> LinkedHashSet { LinkedHashSet { map: LinkedHashMap::new(), } } ``` ```rust pub fn with_capacity(capacity: usize) -> LinkedHashSet { LinkedHashSet { map: LinkedHashMap::with_capacity(capacity), } } ``` -------------------------------- ### OptNonNullExt Trait Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Extension trait for Option> to get a raw pointer. ```APIDOC ## OptNonNullExt Trait ### Description Provides a convenient method to convert an `Option>` into a raw mutable pointer `*mut T`. ### Methods - `as_ptr()`: Returns the raw mutable pointer, or a null pointer if the option is `None`. ``` -------------------------------- ### Create an LRU Cache with a custom hasher Source: https://docs.rs/hashlink/0.11.0/src/hashlink/lru_cache.rs.html Initializes a new LRU cache with a specified capacity and a custom hash builder. This allows for control over the hashing algorithm used for keys. ```rust pub fn with_hasher(capacity: usize, hash_builder: S) -> Self { LruCache { map: LinkedHashMap::with_hasher(hash_builder), max_size: capacity, } } ``` -------------------------------- ### RawEntryBuilder Methods Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Provides methods for building raw entries, allowing efficient lookup based on key or hash. ```APIDOC ## RawEntryBuilder Used to construct raw entries for lookup within the `LinkedHashMap`. ### Methods - **`from_key(self, k: &Q) -> Option<(&'a K, &'a V)>`**: Finds an entry matching the given key `k`. Requires `K: Borrow` and `Q: Hash + Eq + ?Sized`. - **`from_key_hashed_nocheck(self, hash: u64, k: &Q) -> Option<(&'a K, &'a V)>`**: Finds an entry matching the given key `k` using a pre-computed hash. Requires `K: Borrow` and `Q: Hash + Eq + ?Sized`. - **`from_hash(self, hash: u64, mut is_match: impl FnMut(&K) -> bool) -> Option<(&'a K, &'a V)>`**: Finds an entry using a pre-computed hash and a custom matching function. ``` -------------------------------- ### Get Hasher Builder Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns a reference to the hash builder used by the map. ```rust pub fn hasher(&self) -> &S { &self.hash_builder } ``` -------------------------------- ### try_into Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.IterMut.html Performs the conversion. ```APIDOC #### fn try_into(self) -> Result>::Error> Performs the conversion. Source§ ``` -------------------------------- ### Get the hasher of a LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Returns a reference to the hash builder used by the LinkedHashSet. ```rust pub fn hasher(&self) -> &S ``` -------------------------------- ### try_into Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Keys.html Performs the conversion. ```APIDOC #### fn try_into(self) -> Result>::Error> Performs the conversion. ``` -------------------------------- ### Get entry by key Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.RawEntryBuilder.html Retrieves an entry from the map using a borrowed key. This method requires the key type K to implement Borrow and Q to be Hash and Eq. ```rust pub fn from_key(self, k: &Q) -> Option<(&'a K, &'a V)> where K: Borrow, Q: Hash + Eq + ?Sized, ``` -------------------------------- ### From Implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Provides a way to create a type from itself. ```APIDOC ## from(t: T) -> T ### Description Returns the argument unchanged. ### Method `from` ``` -------------------------------- ### Get the hasher builder Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns a reference to the hash builder used by this map. ```rust pub fn hasher(&self) -> &S> ``` -------------------------------- ### Get an iterator over keys Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns an iterator over the keys of the map in insertion order. ```rust pub fn keys(&self) -> Keys<'_, K, V> ⓘ ``` -------------------------------- ### take Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Keys.html Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. ```APIDOC ## fn take(self, n: usize) -> Take where Self: Sized, Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. Read more 1.0.0 · Source ``` -------------------------------- ### take Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.ValuesMut.html Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. ```APIDOC ## fn take(self, n: usize) -> Take ### Description Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. ### Parameters - **n** (usize) - The maximum number of elements to yield. ### Returns - A `Take` iterator. ``` -------------------------------- ### Get mutable reference to value Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns a mutable reference to the value of an occupied entry. ```rust pub fn get_mut(&mut self) -> &mut V { self.get_key_value_mut().1 } ``` -------------------------------- ### Get immutable reference to value Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns an immutable reference to the value of an occupied entry. ```rust pub fn get(&self) -> &V { self.get_key_value().1 } ``` -------------------------------- ### Implement Clone and Copy for ValueLinks Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Allows `ValueLinks` to be easily copied. ```rust impl Clone for ValueLinks { #[inline] fn clone(&self) -> Self { *self } } impl Copy for ValueLinks {} ``` -------------------------------- ### Equivalent Implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Checks for equivalence between keys. ```APIDOC ## equivalent(&self, key: &K) -> bool ### Description Checks if this value is equivalent to the given key. ### Method `equivalent` ``` -------------------------------- ### Get mutable reference to key Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns a mutable reference to the key of an occupied entry. ```rust pub fn key_mut(&mut self) -> &mut K { self.get_key_value_mut().0 } ``` -------------------------------- ### Implement Clone and Copy for FreeLink Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Allows `FreeLink` to be easily copied. ```rust impl Clone for FreeLink { #[inline] fn clone(&self) -> Self { *self } } impl Copy for FreeLink {} ``` -------------------------------- ### Get immutable reference to key Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns an immutable reference to the key of an occupied entry. ```rust pub fn key(&self) -> &K { self.get_key_value().0 } ``` -------------------------------- ### TryFrom Implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Provides a fallible way to create a type from another type. ```APIDOC ## try_from(value: U) -> Result>::Error> ### Description Performs the conversion. ### Method `try_from` ``` -------------------------------- ### Get Capacity Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns the total number of elements the map can hold without reallocating. ```rust pub fn capacity(&self) -> usize { self.table.capacity() } ``` -------------------------------- ### take Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.IterMut.html Creates an iterator that yields the first `n` elements. If the underlying iterator ends before `n` elements are yielded, it yields all available elements. ```APIDOC ## fn take(self, n: usize) -> Take ### Description Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. ### Signature ```rust fn take(self, n: usize) -> Take where Self: Sized, ``` ``` -------------------------------- ### Get Length of LinkedHashMap Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns the number of elements in the LinkedHashMap. This is a constant time operation. ```rust pub fn len(&self) -> usize { self.table.len() } ``` -------------------------------- ### Get a value from a LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Returns a reference to the value in the set, if any, that is equal to the given one. ```rust pub fn get(&self, value: &Q) -> Option<&T> where T: Borrow, Q: Hash + Eq + ?Sized, ``` -------------------------------- ### into Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.IterMut.html Calls `U::from(self)`. That is, this conversion is whatever the implementation of `From for U` chooses to do. ```APIDOC #### fn into(self) -> U Calls `U::from(self)`. That is, this conversion is whatever the implementation of `From for U` chooses to do. Source§ ``` -------------------------------- ### Create a LinkedHashSet with capacity and custom hasher Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Creates a new, empty LinkedHashSet with a specified initial capacity and hash builder. ```rust pub fn with_capacity_and_hasher( capacity: usize, hasher: S, ) -> LinkedHashSet ``` -------------------------------- ### Get a value by key (immutable) Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns a reference to the value corresponding to the key, if it exists. ```rust pub fn get(&self, k: &Q) -> Option<&V> where K: Borrow, Q: Hash + Eq + ?Sized, ``` -------------------------------- ### Get the capacity of LinkedHashMap Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns the number of elements the map can hold without reallocating. ```rust pub fn capacity(&self) -> usize> ``` -------------------------------- ### into Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.IntoIter.html Calls `U::from(self)`. This conversion is whatever the implementation of `From for U` chooses to do. ```APIDOC #### fn into(self) -> U Calls `U::from(self)`. That is, this conversion is whatever the implementation of `From for U` chooses to do. Source ``` -------------------------------- ### clone_to_uninit Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Iter.html Performs copy-assignment from `self` to a destination pointer. This is a nightly-only experimental API. ```APIDOC ## unsafe fn clone_to_uninit(&self, dest: *mut u8) ### Description Performs copy-assignment from `self` to `dest`. ### Parameters - `dest`: A raw pointer to the destination memory location. ### Safety This function is unsafe because it operates on raw pointers and assumes the destination is valid and uninitialized. ``` -------------------------------- ### Get immutable key-value pair Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns immutable references to both the key and value of an occupied entry. ```rust pub fn get_key_value(&self) -> (&K, &V) { unsafe { let node = *self.entry.get(); let (key, value) = (*node.as_ptr()).entry_ref(); ``` -------------------------------- ### Insert or Get Value in LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_set.rs.html Inserts a value if not present, then returns a reference to the value in the set. ```rust pub fn get_or_insert(&mut self, value: T) -> &T { self.map .raw_entry_mut() .from_key(&value) .or_insert(value, ()) .0 } ``` -------------------------------- ### clone_to_uninit Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.Iter.html Performs copy-assignment from `self` to `dest`. This is a nightly-only experimental API. ```APIDOC #### unsafe fn clone_to_uninit(&self, dest: *mut u8) Performs copy-assignment from `self` to `dest`. Read more ``` -------------------------------- ### clone_to_uninit Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Keys.html Performs copy-assignment from `self` to `dest`. This is a nightly-only experimental API. ```APIDOC #### unsafe fn clone_to_uninit(&self, dest: *mut u8) 🔬This is a nightly-only experimental API. (`clone_to_uninit`) Performs copy-assignment from `self` to `dest`. Read more ``` -------------------------------- ### Get Value from LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_set.rs.html Retrieves a reference to the element in the set if it exists, otherwise returns `None`. ```rust pub fn get(&self, value: &Q) -> Option<&T> where T: Borrow, Q: Hash + Eq + ?Sized, { self.map.raw_entry().from_key(value).map(|p| p.0) } ``` -------------------------------- ### partition Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.IntoIter.html Consumes an iterator, creating two collections from it. ```APIDOC ## fn partition(self, f: F) -> (B, B) ### Description Consumes an iterator, creating two collections from it. ### Parameters - `f`: A closure that takes a reference to an item and returns a boolean, determining which collection the item belongs to. ``` -------------------------------- ### Type ID Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.Drain.html Provides a way to get the TypeId of an object, useful for runtime type information. ```APIDOC ### impl Any for T where T: 'static + ?Sized, #### fn type_id(&self) -> TypeId Gets the `TypeId` of `self`. Read more ``` -------------------------------- ### Get a value by key (mutable) Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns a mutable reference to the value corresponding to the key, if it exists. ```rust pub fn get_mut(&mut self, k: &Q) -> Option<&mut V> where K: Borrow, Q: Hash + Eq + ?Sized, ``` -------------------------------- ### TryInto Implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Provides a fallible way to convert a type into another type. ```APIDOC ## try_into(self) -> Result>::Error> ### Description Performs the conversion. ### Method `try_into` ``` -------------------------------- ### Get key-value pair by key Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns a reference to the key-value pair corresponding to the key, if it exists. ```rust pub fn get_key_value(&self, k: &Q) -> Option<(&K, &V)> where K: Borrow, Q: Hash + Eq + ?Sized, ``` -------------------------------- ### CloneToUninit Implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Blanket implementation of the CloneToUninit trait (nightly-only). ```APIDOC ## CloneToUninit Implementation ### Description Performs copy-assignment from `self` to `dest`. ### Note This is a nightly-only experimental API. ### Method `unsafe fn clone_to_uninit(&self, dest: *mut u8)` ``` -------------------------------- ### Accessing and Modifying Entry Data Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.RawOccupiedEntryMut.html Methods for getting and setting the key and value of the occupied entry. ```APIDOC ## RawOccupiedEntryMut Methods ### `key()` Returns an immutable reference to the key. ```rust pub fn key(&self) -> &K ``` ### `key_mut()` Returns a mutable reference to the key. ```rust pub fn key_mut(&mut self) -> &mut K ``` ### `into_key()` Consumes the entry and returns a mutable reference to the key. ```rust pub fn into_key(self) -> &'a mut K ``` ### `get()` Returns an immutable reference to the value. ```rust pub fn get(&self) -> &V ``` ### `get_mut()` Returns a mutable reference to the value. ```rust pub fn get_mut(&mut self) -> &mut V ``` ### `into_mut()` Consumes the entry and returns a mutable reference to the value. ```rust pub fn into_mut(self) -> &'a mut V ``` ### `get_key_value()` Returns immutable references to both the key and the value. ```rust pub fn get_key_value(&self) -> (&K, &V) ``` ### `get_key_value_mut()` Returns mutable references to both the key and the value. ```rust pub fn get_key_value_mut(&mut self) -> (&mut K, &mut V) ``` ### `into_key_value()` Consumes the entry and returns mutable references to both the key and the value. ```rust pub fn into_key_value(self) -> (&'a mut K, &'a mut V) ``` ``` -------------------------------- ### take Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Values.html Creates an iterator that yields at most the first `n` elements. If the underlying iterator ends sooner, it yields fewer elements. ```APIDOC ## fn take(self, n: usize) -> Take ### Description Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. ### Parameters - **n** (usize) - The maximum number of elements to yield. ``` -------------------------------- ### default Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Creates a new, empty LinkedHashMap with default hasher. ```APIDOC ## default ### Description Returns the "default value" for a type. ### Method `default() -> Self` ``` -------------------------------- ### LinkedHashMap Basic Operations Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Provides methods for basic operations like getting the length and clearing the map. ```APIDOC ## `len()` ### Description Returns the number of elements in the map. ### Method `len()` ### Parameters None ### Response (usize) - The number of elements in the map. ## `is_empty()` ### Description Returns `true` if the map contains no elements. ### Method `is_empty()` ### Parameters None ### Response (bool) - `true` if the map is empty, `false` otherwise. ## `clear()` ### Description Clears the map, removing all key-value pairs. Keeps the allocated memory for reuse. ### Method `clear()` ### Parameters None ### Response None ``` -------------------------------- ### Construction Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Methods for creating new LinkedHashSet instances. ```APIDOC ## `new()` ### Description Creates a new, empty `LinkedHashSet` with default capacity and hasher. ### Signature `pub fn new() -> LinkedHashSet` ``` ```APIDOC ## `with_capacity(capacity: usize)` ### Description Creates a new, empty `LinkedHashSet` with the specified capacity. ### Signature `pub fn with_capacity(capacity: usize) -> LinkedHashSet` ``` ```APIDOC ## `with_hasher(hasher: S)` ### Description Creates a new, empty `LinkedHashSet` with the specified hasher. ### Signature `pub fn with_hasher(hasher: S) -> LinkedHashSet` ``` ```APIDOC ## `with_capacity_and_hasher(capacity: usize, hasher: S)` ### Description Creates a new, empty `LinkedHashSet` with the specified capacity and hasher. ### Signature `pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> LinkedHashSet` ``` -------------------------------- ### Insert or Get Value with Function Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_set.rs.html Inserts a value computed by `f` if not present, then returns a reference to the value. ```rust pub fn get_or_insert_with(&mut self, value: &Q, f: F) -> &T where T: Borrow, Q: Hash + Eq + ?Sized, F: FnOnce(&Q) -> T, { self.map .raw_entry_mut() .from_key(value) .or_insert_with(|| (f(value), ())) .0 } ``` -------------------------------- ### Get the back element of a LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Returns a reference to the last element in the linked list, if the set is not empty. ```rust pub fn back(&self) -> Option<&T> ``` -------------------------------- ### Create a new LRU Cache Source: https://docs.rs/hashlink/0.11.0/src/hashlink/lru_cache.rs.html Initializes a new LRU cache with a specified capacity. The capacity determines the maximum number of elements the cache can hold before evicting the least recently used item. ```rust pub fn new(capacity: usize) -> Self { LruCache { map: LinkedHashMap::new(), max_size: capacity, } } ``` -------------------------------- ### Get the front element of a LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Returns a reference to the first element in the linked list, if the set is not empty. ```rust pub fn front(&self) -> Option<&T> ``` -------------------------------- ### TryFrom and TryInto Traits Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Drain.html Documentation for the TryFrom and TryInto traits as implemented for generic types, enabling fallible conversions. ```APIDOC ## impl TryFrom for T where U: Into, ### Associated Types #### type Error = Infallible Description: The type returned in the event of a conversion error. ### Methods #### fn try_from(value: U) -> Result>::Error> Description: Performs the conversion. ## impl TryInto for T where U: TryFrom, ### Associated Types #### type Error = >::Error Description: The type returned in the event of a conversion error. ### Methods #### fn try_into(self) -> Result>::Error> Description: Performs the conversion. ``` -------------------------------- ### by_ref Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Drain.html Creates a "by reference" adapter for an iterator. ```APIDOC ## fn by_ref(&mut self) -> &mut Self ### Description Creates a “by reference” adapter for this instance of `Iterator`. ``` -------------------------------- ### Implement OptNonNullExt for Option> Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Provides a convenient method to get a raw mutable pointer from an `Option>`. ```rust impl OptNonNullExt for Option> { #[inline] fn as_ptr(self) -> *mut T { match self { Some(ptr) => ptr.as_ptr(), None => ptr::null_mut(), } } } ``` -------------------------------- ### Consume entry to get mutable value reference Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Consumes the occupied entry and returns a mutable reference to the value. ```rust pub fn into_mut(self) -> &'a mut V { self.into_key_value().1 } ``` -------------------------------- ### into Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.Iter.html Calls `U::from(self)`. The conversion is determined by the `From for U` implementation. ```APIDOC #### fn into(self) -> U Calls `U::from(self)`. ``` -------------------------------- ### Consume entry to get mutable key reference Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Consumes the occupied entry and returns a mutable reference to the key. ```rust pub fn into_key(self) -> &'a mut K { self.into_key_value().0 } ``` -------------------------------- ### Create LinkedHashSet with Custom Hasher Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_set.rs.html Instantiate a LinkedHashSet with a specific hasher using `with_hasher()` or `with_capacity_and_hasher()`. ```rust pub fn with_hasher(hasher: S) -> LinkedHashSet { LinkedHashSet { map: LinkedHashMap::with_hasher(hasher), } } ``` ```rust pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> LinkedHashSet { LinkedHashSet { map: LinkedHashMap::with_capacity_and_hasher(capacity, hasher), } } ``` -------------------------------- ### Get raw entry builder Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns a `RawEntryBuilder` for accessing raw entries in the map. This is useful for advanced operations. ```rust pub fn raw_entry(&self) -> RawEntryBuilder<'_, K, V, S> { RawEntryBuilder { map: self } } ``` -------------------------------- ### into Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Keys.html Calls `U::from(self)`. The conversion behavior is determined by the `From for U` implementation. ```APIDOC #### fn into(self) -> U Calls `U::from(self)`. That is, this conversion is whatever the implementation of `From for U` chooses to do. ``` -------------------------------- ### Get an entry for modification Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns an `Entry` enum for the given key. This allows for efficient conditional insertion or modification. ```rust pub fn entry(&mut self, key: K) -> Entry<'_, K, V, S> ``` -------------------------------- ### fmt Source: https://docs.rs/hashlink/0.11.0/hashlink/lru_cache/struct.LruCache.html Formats the LruCache for debugging purposes. ```APIDOC ## fmt ### Description Formats the value using the given formatter. ### Signature ```rust fn fmt(&self, f: &mut Formatter<'_>) -> Result ``` ``` -------------------------------- ### Clone implementation for Values iterator Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Allows cloning the `Values` iterator, creating a new iterator that starts from the same position. ```rust impl Clone for Values<'_, K, V> { #[inline] fn clone(&self) -> Self { Values { inner: self.inner.clone(), } } } ``` -------------------------------- ### ExactSizeIterator Methods for ValuesMut<'_, K, V> Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.ValuesMut.html This section details the methods available for iterators with an exact size. ```APIDOC ## ExactSizeIterator Methods for ValuesMut<'_, K, V> This struct implements the `ExactSizeIterator` trait, providing exact length information. ### `fn len(&self) -> usize` Returns the exact remaining length of the iterator. ### `fn is_empty(&self) -> bool` Returns `true` if the iterator is empty. This is a nightly-only experimental API. ``` -------------------------------- ### partition Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Drain.html Consumes an iterator and creates two collections based on a predicate. ```APIDOC ## fn partition(self, f: F) -> (B, B) ### Description Consumes an iterator, creating two collections from it. ``` -------------------------------- ### Clone implementation for Keys iterator Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Allows cloning the `Keys` iterator, creating a new iterator that starts from the same position. ```rust impl<'a, K, V> Clone for Keys<'a, K, V> { #[inline] fn clone(&self) -> Keys<'a, K, V> { Keys { inner: self.inner.clone(), } } } ``` -------------------------------- ### Get Value by Key Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Retrieves a reference to the value associated with the given key. Returns `None` if the key is not present in the map. ```rust pub fn get(&self, k: &Q) -> Option<&V> where K: Borrow, Q: Hash + Eq + ?Sized, { self.raw_entry().from_key(k).map(|(_, v)| v) } ``` -------------------------------- ### Node Entry Management Methods Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Provides methods for safely writing, reading, and taking entries from a `Node`. ```rust impl Node { #[inline] unsafe fn put_entry(&mut self, entry: (K, V)) { self.entry.as_mut_ptr().write(entry) } #[inline] unsafe fn entry_ref(&self) -> &(K, V) { &*self.entry.as_ptr() } #[inline] unsafe fn key_ref(&self) -> &K { &(*self.entry.as_ptr()).0 } #[inline] unsafe fn entry_mut(&mut self) -> &mut (K, V) { &mut *self.entry.as_mut_ptr() } #[inline] unsafe fn take_entry(&mut self) -> (K, V) { self.entry.as_ptr().read() } } ``` -------------------------------- ### Get Back Element Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Retrieves a reference to the key-value pair at the back of the linked list. Returns None if the map is empty. ```rust pub fn back(&self) -> Option<(&K, &V)> { if self.is_empty() { return None; } unsafe { let back = &*(*self.values.as_ptr()).links.value.prev.as_ptr(); let (key, value) = (*back).entry_ref(); Some((key, value)) } } ``` -------------------------------- ### Raw Entry Builder Source: https://docs.rs/hashlink/0.11.0/src/hashlink/lru_cache.rs.html Provides access to a raw entry builder for advanced manipulation of cache entries without immediate LRU list updates. ```APIDOC ## raw_entry ### Description Allows building a raw entry for manual control over its position in the LRU list. ### Method `raw_entry(&self) -> RawEntryBuilder<'_, K, V, S>` ### Parameters None ### Returns A `RawEntryBuilder` instance. ``` ```APIDOC ## raw_entry_mut ### Description Provides mutable access to a raw entry builder, allowing for modifications and manual control over the LRU list position. It ensures capacity is maintained before returning the builder. ### Method `raw_entry_mut(&mut self) -> RawEntryBuilderMut<'_, K, V, S>` ### Parameters None ### Returns A mutable `RawEntryBuilderMut` instance. ``` -------------------------------- ### Any Implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Blanket implementation of the Any trait. ```APIDOC ## Any Implementation ### Description Gets the `TypeId` of `self`. ### Method `type_id(&self) -> TypeId` ``` -------------------------------- ### Get Front Element Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Retrieves a reference to the key-value pair at the front of the linked list. Returns None if the map is empty. ```rust pub fn front(&self) -> Option<(&K, &V)> { if self.is_empty() { return None; } unsafe { let front = (*self.values.as_ptr()).links.value.next.as_ptr(); let (key, value) = (*front).entry_ref(); Some((key, value)) } } ``` -------------------------------- ### Capacity and Size Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Methods for querying the capacity and number of elements in the set. ```APIDOC ## `capacity()` ### Description Returns the current capacity of the set. ### Signature `pub fn capacity(&self) -> usize` ``` ```APIDOC ## `len()` ### Description Returns the number of elements in the set. ### Signature `pub fn len(&self) -> usize` ``` ```APIDOC ## `is_empty()` ### Description Returns `true` if the set contains no elements. ### Signature `pub fn is_empty(&self) -> bool` ``` -------------------------------- ### Get the current number of elements in the LRU Cache Source: https://docs.rs/hashlink/0.11.0/src/hashlink/lru_cache.rs.html Returns the current number of key-value pairs stored in the LRU cache. ```rust pub fn len(&self) -> usize { self.map.len() } ``` -------------------------------- ### clone_from Source: https://docs.rs/hashlink/0.11.0/hashlink/lru_cache/struct.LruCache.html Performs copy-assignment from a source LruCache. ```APIDOC ## clone_from ### Description Performs copy-assignment from `source`. ### Signature ```rust fn clone_from(&mut self, source: &Self) ``` ``` -------------------------------- ### Get the capacity of the LRU Cache Source: https://docs.rs/hashlink/0.11.0/src/hashlink/lru_cache.rs.html Returns the maximum number of elements the LRU cache can hold. This is the capacity set during initialization. ```rust pub fn capacity(&self) -> usize { self.max_size } ``` -------------------------------- ### product Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.IntoIter.html Iterates over the entire iterator, multiplying all the elements. The element type must implement the `Product` trait. ```APIDOC ## fn product

(self) -> P ### Description Iterates over the entire iterator, multiplying all the elements. ### Type Parameters - `P`: The type of the product, must implement `Product`. ### Type Constraints - `Self: Sized` ``` -------------------------------- ### Get the back element of LinkedHashMap Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns a reference to the key-value pair at the back of the internal linked list, if the map is not empty. ```rust pub fn back(&self) -> Option<(&K, &V)> ``` -------------------------------- ### Get the front element of LinkedHashMap Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns a reference to the key-value pair at the front of the internal linked list, if the map is not empty. ```rust pub fn front(&self) -> Option<(&K, &V)> ``` -------------------------------- ### Create a new LinkedHashMap Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Initializes a new, empty LinkedHashMap. This is the most basic constructor. ```rust pub fn new() -> Self> ``` -------------------------------- ### Get an iterator over values (immutable) Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns an iterator over the values of the map in insertion order. The iterator yields immutable references. ```rust pub fn values(&self) -> Values<'_, K, V> ⓘ ``` -------------------------------- ### Create a new LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Creates a new, empty LinkedHashSet with default capacity and hash builder. ```rust pub fn new() -> LinkedHashSet ``` -------------------------------- ### product Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.IntoIter.html Iterates over the entire iterator, multiplying all the elements. ```APIDOC ## product

() ### Description Iterates over the entire iterator, multiplying all the elements. ### Signature ```rust fn product

(self) -> P where Self: Sized, P: Product, ``` ``` -------------------------------- ### DoubleEndedIterator::rfold implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.Iter.html Reduces the iterator’s elements to a single value, starting from the back. This is a backward fold operation. ```rust fn rfold(self, init: B, f: F) -> B where Self: Sized, F: FnMut(B, Self::Item) -> B, ``` -------------------------------- ### Get mutable raw entry builder Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns a mutable `RawEntryBuilderMut` for modifying raw entries in the map. This is useful for advanced operations. ```rust pub fn raw_entry_mut(&mut self) -> RawEntryBuilderMut<'_, K, V, S> { RawEntryBuilderMut { map: self } } ``` -------------------------------- ### product Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.Iter.html Iterates over the entire iterator, multiplying all the elements. The product type `P` must implement `Product` for the iterator's item type. ```APIDOC ## fn product

(self) -> P ### Description Iterates over the entire iterator, multiplying all the elements. ### Type Parameters - `P`: The type of the product, must implement `Product`. ### Constraints - `Self`: Must be `Sized`. ``` -------------------------------- ### Get an iterator over values (mutable) Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.LinkedHashMap.html Returns a mutable iterator over the values of the map in insertion order. The iterator yields mutable references. ```rust pub fn values_mut(&mut self) -> ValuesMut<'_, K, V> ⓘ ``` -------------------------------- ### product Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Keys.html Iterates over the entire iterator, multiplying all the elements. The product type `P` must implement `Product` for the iterator's item type. ```APIDOC ## fn product

(self) -> P ### Description Iterates over the entire iterator, multiplying all the elements. ### Type Parameters * `P`: The type of the product, must implement `Product`. ### Constraints * `Self: Sized` ``` -------------------------------- ### product Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Values.html Iterates over the entire iterator, multiplying all the elements. The product type `P` must implement `Product` for the iterator's item type. ```APIDOC ## fn product

(self) -> P ### Description Iterates over the entire iterator, multiplying all the elements. ### Type Parameters - `P`: The type of the product, must implement `Product`. ### Constraints - `Self` must implement `Sized`. ``` -------------------------------- ### Get Mutable Key-Value Pair Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Retrieves mutable references to the key and value of the current entry. Use when modifying both key and value in place. ```rust pub fn get_key_value_mut(&mut self) -> (&mut K, &mut V) { unsafe { let node = *self.entry.get_mut(); let (key, value) = (*node.as_ptr()).entry_mut(); (key, value) } } ``` -------------------------------- ### Get Mutable Value by Key Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Retrieves a mutable reference to the value associated with the given key. Returns `None` if the key is not present in the map. ```rust pub fn get_mut(&mut self, k: &Q) -> Option<&mut V> where K: Borrow, Q: Hash + Eq + ?Sized, { match self.raw_entry_mut().from_key(k) { RawEntryMut::Occupied(occupied) => Some(occupied.into_mut()), RawEntryMut::Vacant(_) => None, } } ``` -------------------------------- ### partition Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_map/struct.Iter.html Consumes an iterator, creating two collections based on a predicate. ```APIDOC ## fn partition(self, f: F) -> (B, B) ### Description Consumes an iterator, creating two collections from it. ### Parameters - `f`: A closure that takes a reference to an item and returns a boolean, determining which collection the item belongs to. ### Type Parameters - `B`: The type of the collections, which must implement `Default` and `Extend`. ``` -------------------------------- ### fn product

(self) -> P Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.SymmetricDifference.html Iterates over the entire iterator, multiplying all the elements. ```APIDOC ## fn product

(self) -> P ### Description Iterates over the entire iterator, multiplying all the elements. ### Constraints Requires `P: Product`. ``` -------------------------------- ### Get Key-Value Pair by Key Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Retrieves references to the key and value associated with the given key. Returns `None` if the key is not present in the map. ```rust pub fn get_key_value(&self, k: &Q) -> Option<(&K, &V)> where K: Borrow, Q: Hash + Eq + ?Sized, { self.raw_entry().from_key(k) } ``` -------------------------------- ### Get an iterator over the LRU Cache entries Source: https://docs.rs/hashlink/0.11.0/src/hashlink/lru_cache.rs.html Returns an iterator that yields immutable references to the key-value pairs in the LRU cache, in their insertion order. ```rust pub fn iter(&self) -> Iter<'_, K, V> { self.map.iter() } ``` -------------------------------- ### Create a LinkedHashSet with capacity Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Creates a new, empty LinkedHashSet with a specified initial capacity. ```rust pub fn with_capacity(capacity: usize) -> LinkedHashSet ``` -------------------------------- ### Default Implementation Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_set.rs.html Provides a default, empty LinkedHashSet instance. ```APIDOC ## impl Default for LinkedHashSet ### Description Creates a new, empty `LinkedHashSet` with a default hasher. ### Returns An empty `LinkedHashSet`. ``` -------------------------------- ### Get or insert a value into a LinkedHashSet Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.LinkedHashSet.html Returns a reference to the value in the set. If the set did not have this value present, `value` is inserted at the back of the linked list. ```rust pub fn get_or_insert(&mut self, value: T) -> &T ``` -------------------------------- ### extend Source: https://docs.rs/hashlink/0.11.0/hashlink/lru_cache/struct.LruCache.html Extends the LruCache with the contents of an iterator of key-value pairs. ```APIDOC ## extend ### Description Extends a collection with the contents of an iterator. ### Signature ```rust fn extend>(&mut self, iter: I) ``` ``` -------------------------------- ### CursorMut::current - Get current element Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Returns the current element as a mutable tuple of key and value. Returns `None` if the cursor is over the guard node. ```rust pub fn current(&mut self) -> Option<(&K, &mut V)> { unsafe { let at = NonNull::new_unchecked(self.cur); self.peek(at) } } ``` -------------------------------- ### Get mutable cursor to the guard node Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Provides a mutable cursor pointing to the guard node of the linked hash map. This is an internal helper function. ```rust fn cursor_mut(&mut self) -> CursorMut<'_, K, V, S> { unsafe { ensure_guard_node(&mut self.values) }; CursorMut { cur: self.values.as_ptr(), hash_builder: &self.hash_builder, free: &mut self.free, values: &mut self.values, table: &mut self.table, } } ``` -------------------------------- ### TryFrom Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.Drain.html Attempt to convert a value into another type, returning a Result. ```APIDOC ### impl TryFrom for T where U: Into, #### type Error = Infallible The type returned in the event of a conversion error. #### fn try_from(value: U) -> Result>::Error> Performs the conversion. ``` -------------------------------- ### Get a mutable iterator over the LRU Cache entries Source: https://docs.rs/hashlink/0.11.0/src/hashlink/lru_cache.rs.html Returns an iterator that yields mutable references to the key-value pairs in the LRU cache, in their insertion order. ```rust pub fn iter_mut(&mut self) -> IterMut<'_, K, V> { self.map.iter_mut() } ``` -------------------------------- ### front Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_set.rs.html Returns a reference to the first element in the set's insertion order, or `None` if the set is empty. ```APIDOC ## front ### Description Returns a reference to the first element in the set according to its insertion order. Returns `None` if the set is empty. ### Signature `pub fn front(&self) -> Option<&T>` ### Returns An `Option<&T>` which is `Some` containing a reference to the first element, or `None` if the set is empty. ``` -------------------------------- ### DoubleEndedIterator::try_rfold implementation Source: https://docs.rs/hashlink/0.11.0/hashlink/linked_hash_set/struct.Iter.html The reverse version of `Iterator::try_fold()`: it takes elements starting from the back of the iterator. This allows for early termination in backward folding. ```rust fn try_rfold(&mut self, init: B, f: F) -> R where Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try, ``` -------------------------------- ### Sync Implementation for RawOccupiedEntryMut Source: https://docs.rs/hashlink/0.11.0/src/hashlink/linked_hash_map.rs.html Marks RawOccupiedEntryMut as Sync if its key, value, and state are Sync, enabling safe cross-thread sharing. ```rust unsafe impl Sync for RawOccupiedEntryMut<'_, K, V, S> where K: Sync, V: Sync, S: Sync, { } ```