pub struct StakeCacheData {
pub stake_accounts: HashMap<Pubkey, StakeAccount>,
pub validator_accounts: HashMap<Pubkey, ValidatorAccount>,
pub epoch: u64,
pub timestamp: u64,
}Expand description
Data structure holding the cached stake and validator accounts.
Uses ImHashMap for O(1) cloning via structural sharing.
Fields§
§stake_accounts: HashMap<Pubkey, StakeAccount>Map of stake accounts by public key.
validator_accounts: HashMap<Pubkey, ValidatorAccount>Map of validator accounts by public key.
epoch: u64The epoch when this snapshot was taken.
timestamp: u64The timestamp (in milliseconds) when this snapshot was taken.
Trait Implementations§
Source§impl Clone for StakeCacheData
impl Clone for StakeCacheData
Source§fn clone(&self) -> StakeCacheData
fn clone(&self) -> StakeCacheData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StakeCacheData
impl Debug for StakeCacheData
Source§impl Default for StakeCacheData
impl Default for StakeCacheData
Source§fn default() -> StakeCacheData
fn default() -> StakeCacheData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StakeCacheData
impl RefUnwindSafe for StakeCacheData
impl Send for StakeCacheData
impl Sync for StakeCacheData
impl Unpin for StakeCacheData
impl UnsafeUnpin for StakeCacheData
impl UnwindSafe for StakeCacheData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more