pub struct ModulesMap {
inner: ThinHashMap<ModuleId, ModuleData, FxBuildHasher>,
}Expand description
A newtype wrapper around ThinFxHashMap<ModuleId, ModuleData> that implements IndexMut.
Fields§
§inner: ThinHashMap<ModuleId, ModuleData, FxBuildHasher>Implementations§
Source§impl ModulesMap
impl ModulesMap
Methods from Deref<Target = ThinHashMap<ModuleId, ModuleData, FxBuildHasher>>§
pub fn reserve(&mut self, additional: usize)
pub fn shrink_to_fit(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> Iter<'_, K, V, M> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, K, V, M> ⓘ
pub fn keys(&self) -> impl ExactSizeIterator
pub fn values(&self) -> impl ExactSizeIterator
pub fn values_mut(&mut self) -> impl ExactSizeIterator
pub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn get<Q>(&self, key: &Q) -> Option<&V>
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
pub fn get_disjoint_mut<Q, const N: usize>( &mut self, ks: [&Q; N], ) -> [Option<&mut V>; N]
pub fn insert(&mut self, key: K, value: V) -> Option<V>
pub fn entry(&mut self, key: K) -> Entry<'_, K, V, M>
pub fn remove<Q>(&mut self, key: &Q) -> Option<V>
Trait Implementations§
Source§impl Debug for ModulesMap
impl Debug for ModulesMap
Source§impl Deref for ModulesMap
impl Deref for ModulesMap
Source§type Target = ThinMap<ModuleIdLt<'static>, ModuleData, HashMap<ModuleIdLt<'static>, ModuleData, FxBuildHasher>>
type Target = ThinMap<ModuleIdLt<'static>, ModuleData, HashMap<ModuleIdLt<'static>, ModuleData, FxBuildHasher>>
The resulting type after dereferencing.
Source§impl DerefMut for ModulesMap
impl DerefMut for ModulesMap
impl Eq for ModulesMap
Source§impl Index<ModuleIdLt<'_>> for ModulesMap
impl Index<ModuleIdLt<'_>> for ModulesMap
Source§type Output = ModuleData
type Output = ModuleData
The returned type after indexing.
Source§fn index(&self, id: ModuleIdLt<'_>) -> &ModuleData
fn index(&self, id: ModuleIdLt<'_>) -> &ModuleData
Performs the indexing (
container[index]) operation. Read moreSource§impl IndexMut<ModuleIdLt<'static>> for ModulesMap
impl IndexMut<ModuleIdLt<'static>> for ModulesMap
Source§impl PartialEq for ModulesMap
impl PartialEq for ModulesMap
impl StructuralPartialEq for ModulesMap
Auto Trait Implementations§
impl Freeze for ModulesMap
impl RefUnwindSafe for ModulesMap
impl Send for ModulesMap
impl Sync for ModulesMap
impl Unpin for ModulesMap
impl UnsafeUnpin for ModulesMap
impl UnwindSafe for ModulesMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more