Struct solana_runtime::stakes::Stakes
source · pub struct Stakes<T: Clone> { /* private fields */ }
Expand description
The generic type T is either Delegation or StakeAccount.
Stakes<Delegation>
is equivalent to the old code and is used for backward
compatibility in crate::bank::BankFieldsToDeserialize
.
But banks cache Stakes<StakeAccount>
which includes the entire stake
account and StakeStateV2 deserialized from the account. Doing so, will remove
the need to load the stake account from accounts-db when working with
stake-delegations.
Implementations§
source§impl<T: Clone> Stakes<T>
impl<T: Clone> Stakes<T>
pub fn vote_accounts(&self) -> &VoteAccounts
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Stakes<T>where
T: Deserialize<'de> + Clone,
impl<'de, T> Deserialize<'de> for Stakes<T>where T: Deserialize<'de> + Clone,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Stakes<Delegation>> for StakesEnum
impl From<Stakes<Delegation>> for StakesEnum
source§impl From<Stakes<StakeAccount<Delegation>>> for StakesEnum
impl From<Stakes<StakeAccount<Delegation>>> for StakesEnum
source§impl<T: PartialEq + Clone> PartialEq for Stakes<T>
impl<T: PartialEq + Clone> PartialEq for Stakes<T>
impl<T: Clone> StructuralPartialEq for Stakes<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Stakes<T>where T: RefUnwindSafe,
impl<T> Send for Stakes<T>where T: Send + Sync,
impl<T> Sync for Stakes<T>where T: Send + Sync,
impl<T> Unpin for Stakes<T>where T: Unpin,
impl<T> UnwindSafe for Stakes<T>where T: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + ?Sized,
default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + AbiExample + ?Sized,
default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
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