pub struct CumulativeHashesFromFiles { /* private fields */ }
Expand description
used by merkle tree calculation to lookup account hashes by overall index
Implementations§
source§impl CumulativeHashesFromFiles
impl CumulativeHashesFromFiles
sourcepub fn from_files(hashes: Vec<AccountHashesFile>) -> Self
pub fn from_files(hashes: Vec<AccountHashesFile>) -> Self
Calculate offset from overall index to which file and offset within that file based on the length of each hash file. Also collect readers to access the data.
sourcepub fn total_count(&self) -> usize
pub fn total_count(&self) -> usize
total # of items referenced
pub fn get_slice(&self, start: usize) -> &[Hash]
Trait Implementations§
source§impl Default for CumulativeHashesFromFiles
impl Default for CumulativeHashesFromFiles
source§fn default() -> CumulativeHashesFromFiles
fn default() -> CumulativeHashesFromFiles
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for CumulativeHashesFromFiles
impl Send for CumulativeHashesFromFiles
impl Sync for CumulativeHashesFromFiles
impl Unpin for CumulativeHashesFromFiles
impl UnwindSafe for CumulativeHashesFromFiles
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