Struct solana_runtime::cache_hash_data::CacheHashDataFile
source · pub(crate) struct CacheHashDataFile {
cell_size: u64,
mmap: MmapMut,
capacity: u64,
}
Fields§
§cell_size: u64
§mmap: MmapMut
§capacity: u64
Implementations§
source§impl CacheHashDataFile
impl CacheHashDataFile
sourcepub(crate) fn get_cache_hash_data(&self) -> &[EntryType]
pub(crate) fn get_cache_hash_data(&self) -> &[EntryType]
return a slice of a reference to all the cache hash data from the mmapped file
sourcefn get_element_offset_byte(&self, ix: u64) -> usize
fn get_element_offset_byte(&self, ix: u64) -> usize
return byte offset of entry ‘ix’ into a slice which contains a header and at least ix elements
sourcefn get_slice_internal(&self, ix: u64) -> &[u8] ⓘ
fn get_slice_internal(&self, ix: u64) -> &[u8] ⓘ
get the bytes representing cache file [ix]
fn get_header_mut(&mut self) -> &mut Header
fn new_map(file: impl AsRef<Path>, capacity: u64) -> Result<MmapMut, Error>
fn load_map(file: impl AsRef<Path>) -> Result<MmapMut, Error>
Auto Trait Implementations§
impl RefUnwindSafe for CacheHashDataFile
impl Send for CacheHashDataFile
impl Sync for CacheHashDataFile
impl Unpin for CacheHashDataFile
impl UnwindSafe for CacheHashDataFile
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