pub fn update_stats_fast<T>(&self, stats: MemoryStats)
    where
        T: Any,
    {
        let type_id = TypeId::of::<T>();

        let inner = self.inner.read();

        let entry = inner
            .datasizes
            .get(&type_id)
            .expect("Memory usage not tracked for this type. Did you forget to register the type?");

        entry.set(stats);
    }
/// Like [`update_stats`][Self::update_stats] but operates on a shared reference.
///
/// In exchange for the slight possibility that individual fields in
/// [`MemoryStats`] will be inconsistent with each other, this allows making
/// multiple updates to the resource concurrently.
Like [`update_stats`][Self::update_stats] but operates on a shared reference.
In exchange for the slight possibility that individual fields in
[`MemoryStats`] will be inconsistent with each other, this allows making
multiple updates to the resource concurrently.
Like [ ` update_stats ` ] [ Self :: update_stats ] but operates on a shared reference . In exchange for the slight possibility that individual fields in [ ` MemoryStats ` ] will be inconsistent with each other this allows making multiple updates to the resource concurrently .
pub fn update_stats_fast<T>(&self, stats: MemoryStats)
    where
        T: Any,
    {
        let type_id = TypeId::of::<T>();
        let inner = self.inner.read();
        let entry = inner
            .datasizes
            .get(&type_id)
            .expect("Memory usage not tracked for this type. Did you forget to register the type?");
        entry.set(stats);
    }
pub fn update_stats_fast < T > ( & self , stats : MemoryStats ) where T : Any , { let type_id = TypeId :: of :: < T > ( ) ; let inner = self . inner . read ( ) ; let entry = inner . datasizes . get ( & type_id ) . expect ( " " ) ; entry . set ( stats ) ; }
Like [`update_stats`][Self::update_stats] but operates on a shared reference.
Like [ ` update_stats ` ] [ Self :: update_stats ] but operates on a shared reference .
&self
stats
MemoryStats