Struct frame_system::limits::BlockWeightsBuilder [−][src]
pub struct BlockWeightsBuilder { /* fields omitted */ }
An opinionated builder for Weights
object.
Implementations
impl BlockWeightsBuilder
[src]
impl BlockWeightsBuilder
[src]pub fn base_block(self, base_block: Weight) -> Self
[src][−]
Set base block weight.
pub fn avg_block_initialization(self, init_cost: Perbill) -> Self
[src][−]
Average block initialization weight cost.
This value is used to derive maximal allowed extrinsic weight for each class, based on the allowance.
This is to make sure that extrinsics don’t stay forever in the pool,
because they could seamingly fit the block (since they are below max_block
),
but the cost of calling on_initialize
alway prevents them from being included.
pub fn for_class(
self,
class: impl OneOrMany<DispatchClass>,
action: impl Fn(&mut WeightsPerClass)
) -> Self
[src][−]
self,
class: impl OneOrMany<DispatchClass>,
action: impl Fn(&mut WeightsPerClass)
) -> Self
Set parameters for particular class.
Note: None
values of max_extrinsic
will be overwritten in build
in case
avg_block_initialization
rate is set to a non-zero value.
pub fn build(self) -> ValidationResult
[src][−]
Construct the BlockWeights
object.
pub fn build_or_panic(self) -> BlockWeights
[src][−]
Construct the BlockWeights
object or panic if it’s invalid.
This is a convenience method to be called whenever you construct a runtime.
Auto Trait Implementations
impl RefUnwindSafe for BlockWeightsBuilder
impl Send for BlockWeightsBuilder
impl Sync for BlockWeightsBuilder
impl Unpin for BlockWeightsBuilder
impl UnwindSafe for BlockWeightsBuilder
Blanket Implementations
impl<T> CheckedConversion for T
[src]
impl<T> CheckedConversion for T
[src]pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src][−]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src][−]
Self: TryInto<T>,
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src][−]
pub fn in_current_span(self) -> Instrumented<Self>
[src][−]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]impl<T> SaturatedConversion for T
[src]
impl<T> SaturatedConversion for T
[src]pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
[src][−]
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
[src][−]
Self: UniqueSaturatedInto<T>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]pub fn unchecked_into(self) -> T
[src][−]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src]pub fn unique_saturated_into(self) -> T
[src][−]
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,