pub struct ReservedAccountKeys {
pub active: HashSet<Pubkey>,
/* private fields */
}
Expand description
ReservedAccountKeys
holds the set of currently active/inactive
account keys that are reserved by the protocol and may not be write-locked
during transaction processing.
Fields§
§active: HashSet<Pubkey>
Set of currently active reserved account keys
Implementations§
Source§impl ReservedAccountKeys
impl ReservedAccountKeys
Sourcepub fn new_all_activated() -> Self
pub fn new_all_activated() -> Self
Compute a set with all reserved keys active, regardless of whether their feature was activated. This is not to be used by the runtime. Useful for off-chain utilities that need to filter out reserved accounts.
Sourcepub fn is_reserved(&self, key: &Pubkey) -> bool
pub fn is_reserved(&self, key: &Pubkey) -> bool
Returns whether the specified key is reserved
Sourcepub fn update_active_set(&mut self, feature_set: &FeatureSet)
pub fn update_active_set(&mut self, feature_set: &FeatureSet)
Move inactive reserved account keys to the active set if their feature is active.
Sourcepub fn all_keys_iter() -> impl Iterator<Item = &'static Pubkey>
pub fn all_keys_iter() -> impl Iterator<Item = &'static Pubkey>
Return an iterator over all active / inactive reserved keys. This is not to be used by the runtime. Useful for off-chain utilities that need to filter out reserved accounts.
Sourcepub fn empty_key_set() -> HashSet<Pubkey>
pub fn empty_key_set() -> HashSet<Pubkey>
Return an empty set of reserved keys for visibility when using in tests where the dynamic reserved key set is not available
Trait Implementations§
Source§impl Clone for ReservedAccountKeys
impl Clone for ReservedAccountKeys
Source§fn clone(&self) -> ReservedAccountKeys
fn clone(&self) -> ReservedAccountKeys
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ReservedAccountKeys
impl Debug for ReservedAccountKeys
Source§impl Default for ReservedAccountKeys
impl Default for ReservedAccountKeys
Source§impl PartialEq for ReservedAccountKeys
impl PartialEq for ReservedAccountKeys
impl StructuralPartialEq for ReservedAccountKeys
Auto Trait Implementations§
impl Freeze for ReservedAccountKeys
impl RefUnwindSafe for ReservedAccountKeys
impl Send for ReservedAccountKeys
impl Sync for ReservedAccountKeys
impl Unpin for ReservedAccountKeys
impl UnwindSafe for ReservedAccountKeys
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
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>
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>
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