unsafe fn load_through_cache(&self) -> NonNull<StorageEntry<T>> {
        // SAFETY: This is critical because we mutably access the entry.
        //         However, we mutate the entry only if it is vacant.
        //         If the entry is occupied by a value we return early.
        //         This way we do not invalidate pointers to this value.
        let cache = &mut *self.cache.get_ptr().as_ptr();
        if cache.is_none() {
            // Load value from storage and then return the cached entry.
            let value = self
                .key
                .map(|key| pull_spread_root_opt::<T>(&key))
                .unwrap_or(None);
            *cache = Some(StorageEntry::new(value, EntryState::Preserved));
        }
        debug_assert!(cache.is_some());
        NonNull::from(cache.as_mut().expect("unpopulated cache entry"))
    }
/// Loads the storage entry.
///
/// Tries to load the entry from cache and falls back to lazily load the
/// entry from the contract storage.
Loads the storage entry.
Tries to load the entry from cache and falls back to lazily load the
entry from the contract storage.
Loads the storage entry . Tries to load the entry from cache and falls back to lazily load the entry from the contract storage .
unsafe fn load_through_cache(&self) -> NonNull<StorageEntry<T>> {
        // SAFETY: This is critical because we mutably access the entry.
        //         However, we mutate the entry only if it is vacant.
        //         If the entry is occupied by a value we return early.
        //         This way we do not invalidate pointers to this value.
        let cache = &mut *self.cache.get_ptr().as_ptr();
        if cache.is_none() {
            // Load value from storage and then return the cached entry.
            let value = self
                .key
                .map(|key| pull_spread_root_opt::<T>(&key))
                .unwrap_or(None);
            *cache = Some(StorageEntry::new(value, EntryState::Preserved));
        }
        debug_assert!(cache.is_some());
        NonNull::from(cache.as_mut().expect("unpopulated cache entry"))
    }
unsafe fn load_through_cache ( & self ) -> NonNull < StorageEntry < T > > { // SAFETY: This is critical because we mutably access the entry. //         However, we mutate the entry only if it is vacant. //         If the entry is occupied by a value we return early. //         This way we do not invalidate pointers to this value. let cache = & mut * self . cache . get_ptr ( ) . as_ptr ( ) ; if cache . is_none ( ) { // Load value from storage and then return the cached entry. let value = self . key . map ( | key | pull_spread_root_opt :: < T > ( & key ) ) . unwrap_or ( None ) ; * cache = Some ( StorageEntry :: new ( value , EntryState :: Preserved ) ) ; } debug_assert ! ( cache is_some ( ) ) ; NonNull :: from ( cache . as_mut ( ) . expect ( " " ) ) }
Loads the storage entry.
Loads the storage entry .
&self
&self