Struct solana_runtime::sorted_storages::SortedStorages
source · pub struct SortedStorages<'a> { /* private fields */ }
Expand description
Provide access to SnapshotStorages sorted by slot
Implementations§
source§impl<'a> SortedStorages<'a>
impl<'a> SortedStorages<'a>
sourcepub fn iter_range<R>(&'a self, range: R) -> SortedStoragesIter<'a> ⓘwhere
R: RangeBounds<Slot>,
pub fn iter_range<R>(&'a self, range: R) -> SortedStoragesIter<'a> ⓘwhere R: RangeBounds<Slot>,
primary method of retrieving (Slot, SnapshotStorage)
pub fn range_width(&self) -> Slot
pub fn range(&self) -> &Range<Slot>
pub fn max_slot_inclusive(&self) -> Slot
pub fn slot_count(&self) -> usize
pub fn storage_count(&self) -> usize
pub fn new(source: &'a [SnapshotStorage]) -> Self
sourcepub fn new_with_slots(
source: impl Iterator<Item = (&'a SnapshotStorage, Slot)> + Clone,
min_slot: Option<Slot>,
max_slot_inclusive: Option<Slot>
) -> Self
pub fn new_with_slots( source: impl Iterator<Item = (&'a SnapshotStorage, Slot)> + Clone, min_slot: Option<Slot>, max_slot_inclusive: Option<Slot> ) -> Self
create SortedStorages
from ‘source’ iterator.
‘source’ contains a SnapshotStorage and its associated slot
‘source’ does not have to be sorted in any way, but is assumed to not have duplicate slot #s