pub struct UpgradeRequestBuilder { /* private fields */ }Expand description
Builds an UpgradeConfig.
Implementations§
source§impl UpgradeRequestBuilder
impl UpgradeRequestBuilder
sourcepub fn with_pre_state_hash(self, pre_state_hash: Digest) -> Self
pub fn with_pre_state_hash(self, pre_state_hash: Digest) -> Self
Sets a pre-state hash using a Digest.
sourcepub fn with_current_protocol_version(
self,
protocol_version: ProtocolVersion
) -> Self
pub fn with_current_protocol_version( self, protocol_version: ProtocolVersion ) -> Self
Sets current_protocol_version to the given ProtocolVersion.
sourcepub fn with_new_protocol_version(
self,
protocol_version: ProtocolVersion
) -> Self
pub fn with_new_protocol_version( self, protocol_version: ProtocolVersion ) -> Self
Sets new_protocol_version to the given ProtocolVersion.
sourcepub fn with_new_validator_slots(self, new_validator_slots: u32) -> Self
pub fn with_new_validator_slots(self, new_validator_slots: u32) -> Self
Sets new_validator_slots.
sourcepub fn with_new_auction_delay(self, new_auction_delay: u64) -> Self
pub fn with_new_auction_delay(self, new_auction_delay: u64) -> Self
Sets new_auction_delay.
sourcepub fn with_new_locked_funds_period_millis(
self,
new_locked_funds_period_millis: u64
) -> Self
pub fn with_new_locked_funds_period_millis( self, new_locked_funds_period_millis: u64 ) -> Self
Sets new_locked_funds_period_millis.
sourcepub fn with_new_round_seigniorage_rate(self, rate: Ratio<u64>) -> Self
pub fn with_new_round_seigniorage_rate(self, rate: Ratio<u64>) -> Self
Sets new_round_seigniorage_rate.
sourcepub fn with_new_unbonding_delay(self, unbonding_delay: u64) -> Self
pub fn with_new_unbonding_delay(self, unbonding_delay: u64) -> Self
Sets new_unbonding_delay.
sourcepub fn with_global_state_update(
self,
global_state_update: BTreeMap<Key, StoredValue>
) -> Self
pub fn with_global_state_update( self, global_state_update: BTreeMap<Key, StoredValue> ) -> Self
Sets global_state_update.
sourcepub fn with_activation_point(self, activation_point: EraId) -> Self
pub fn with_activation_point(self, activation_point: EraId) -> Self
Sets activation_point.
sourcepub fn with_chainspec_registry(
self,
chainspec_registry: ChainspecRegistry
) -> Self
pub fn with_chainspec_registry( self, chainspec_registry: ChainspecRegistry ) -> Self
Sets the Chainspec registry.
sourcepub fn build(self) -> UpgradeConfig
pub fn build(self) -> UpgradeConfig
Consumes the UpgradeRequestBuilder and returns an UpgradeConfig.
Trait Implementations§
source§impl Default for UpgradeRequestBuilder
impl Default for UpgradeRequestBuilder
source§fn default() -> UpgradeRequestBuilder
fn default() -> UpgradeRequestBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for UpgradeRequestBuilder
impl Send for UpgradeRequestBuilder
impl Sync for UpgradeRequestBuilder
impl Unpin for UpgradeRequestBuilder
impl UnwindSafe for UpgradeRequestBuilder
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.