pub struct FeatureSet {
pub active: HashMap<Pubkey, Slot>,
pub inactive: HashSet<Pubkey>,
}
Expand description
FeatureSet
holds the set of currently active/inactive runtime features
Fields§
§active: HashMap<Pubkey, Slot>
§inactive: HashSet<Pubkey>
Implementations§
source§impl FeatureSet
impl FeatureSet
pub fn is_active(&self, feature_id: &Pubkey) -> bool
pub fn activated_slot(&self, feature_id: &Pubkey) -> Option<Slot>
sourcepub fn full_inflation_features_enabled(&self) -> HashSet<Pubkey>
pub fn full_inflation_features_enabled(&self) -> HashSet<Pubkey>
List of enabled features that trigger full inflation
sourcepub fn all_enabled() -> Self
pub fn all_enabled() -> Self
All features enabled, useful for testing
sourcepub fn deactivate(&mut self, feature_id: &Pubkey)
pub fn deactivate(&mut self, feature_id: &Pubkey)
Deactivate a feature
pub fn new_warmup_cooldown_rate_epoch( &self, epoch_schedule: &EpochSchedule, ) -> Option<Epoch>
Trait Implementations§
source§impl AbiExample for FeatureSet
impl AbiExample for FeatureSet
source§impl Clone for FeatureSet
impl Clone for FeatureSet
source§fn clone(&self) -> FeatureSet
fn clone(&self) -> FeatureSet
Returns a copy 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 FeatureSet
impl Debug for FeatureSet
source§impl Default for FeatureSet
impl Default for FeatureSet
source§impl PartialEq for FeatureSet
impl PartialEq for FeatureSet
impl Eq for FeatureSet
impl StructuralPartialEq for FeatureSet
Auto Trait Implementations§
impl Freeze for FeatureSet
impl RefUnwindSafe for FeatureSet
impl Send for FeatureSet
impl Sync for FeatureSet
impl Unpin for FeatureSet
impl UnwindSafe for FeatureSet
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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