pub struct DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32 = 10, const ALLOW_NORMAL: bool = true>(pub Inner, _);Expand description
Transaction extension that dynamically changes the max block weight.
With block bundling, parachains are running with block weights that may not allow certain transactions to be applied, e.g. a runtime upgrade. To ensure that these transactions can still be applied, this transaction extension can change the max block weight as required. There are multiple requirements for it to change the block weight:
-
Only the first block of a core is allowed to change its block weight.
-
Any
inherentor any transaction up toMAX_TRANSACTION_TO_CONSIDERrequires more block weight than the target extrinsic weight. Target extrinsic weight is the max weight for the respective extrinsic class. The priority to determine the target e weight is the following, we start checking ifWeightsPerClass::max_extrinsicis set, after thisWeightsPerClass::max_totaland if both of these areNonewe fall back to the actual target block weight.
Because the node is tracking the wall clock time while building a block to abort block
production if it takes too long, we do not allow any block to change the block weight. The node
knows that the first block of a core may runs longer. So, the node allows this block to take up
to 2s of wall clock time. 2s is the time each PoV gets on the relay chain for its
validation or in other words the maximum core execution time. The extension sets the
[CumulusDigestItem::UseFullCore] digest when the block should occupy the entire core.
Before dispatching an extrinsic the extension will check the requirements and set the
appropriate BlockWeightMode. After the extrinsic has finished, the checks from before
dispatching the extrinsic are repeated with the post dispatch weights. The BlockWeightMode
is changed properly.
§Note
The extension requires that any of the inner extensions sets the
BlockWeight. Otherwise the weight tracking is not working
properly. Normally this is done by CheckWeight.
§Generic parameters
-
Config: TheConfigtrait of this pallet. -
Inner: The inner transaction extensions aka the other transaction extensions to be used by the runtime. -
TargetBlockRate: The target block rate the parachain should be running with. Or in other words, the number of blocks the parachain should produce in6s(relay chain slot duration). -
MAX_TRANSACTION: The maximum number of transactions to consider before giving up to change the max block weight. -
ALLOW_NORMAL: Should transactions with a dispatch classNormalbe allowed to change the max block weight?
Tuple Fields§
§0: InnerImplementations§
Source§impl<T, S, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> DynamicMaxBlockWeight<T, S, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
impl<T, S, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> DynamicMaxBlockWeight<T, S, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
Sourcepub fn new(s: S) -> Self
pub fn new(s: S) -> Self
Create a new DynamicMaxBlockWeight instance.
Trait Implementations§
Source§impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Clone for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Clone,
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Clone for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Clone,
Source§impl<Config, Inner: Debug, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Debug for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
impl<Config, Inner: Debug, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Debug for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
Source§impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Decode for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Decode,
PhantomData<(Config, TargetBlockRate)>: Decode,
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Decode for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Decode,
PhantomData<(Config, TargetBlockRate)>: Decode,
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Source§impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Default for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Default,
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Default for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Default,
Source§impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Encode for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Encode,
PhantomData<(Config, TargetBlockRate)>: Encode,
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Encode for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Encode,
PhantomData<(Config, TargetBlockRate)>: Encode,
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Source§impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> From<Inner> for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> From<Inner> for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
Source§impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> PartialEq for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: PartialEq,
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> PartialEq for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: PartialEq,
Source§impl<Config: Config + Send + Sync, Inner: TransactionExtension<Config::RuntimeCall>, TargetBlockRate: Get<u32> + Send + Sync + 'static, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> TransactionExtension<<Config as Config>::RuntimeCall> for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Config::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
impl<Config: Config + Send + Sync, Inner: TransactionExtension<Config::RuntimeCall>, TargetBlockRate: Get<u32> + Send + Sync + 'static, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> TransactionExtension<<Config as Config>::RuntimeCall> for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Config::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
Source§const IDENTIFIER: &'static str = "DynamicMaxBlockWeight<Use `metadata()`!>"
const IDENTIFIER: &'static str = "DynamicMaxBlockWeight<Use `metadata()`!>"
Source§type Implicit = <Inner as TransactionExtension<<Config as Config>::RuntimeCall>>::Implicit
type Implicit = <Inner as TransactionExtension<<Config as Config>::RuntimeCall>>::Implicit
implicit function and not directly contained in the
transaction itself and therefore is considered “implicit”.Source§type Val = <Inner as TransactionExtension<<Config as Config>::RuntimeCall>>::Val
type Val = <Inner as TransactionExtension<<Config as Config>::RuntimeCall>>::Val
validate to prepare.Source§type Pre = <Inner as TransactionExtension<<Config as Config>::RuntimeCall>>::Pre
type Pre = <Inner as TransactionExtension<<Config as Config>::RuntimeCall>>::Pre
prepare to post_dispatch.Source§fn implicit(&self) -> Result<Self::Implicit, TransactionValidityError>
fn implicit(&self) -> Result<Self::Implicit, TransactionValidityError>
Source§fn metadata() -> Vec<TransactionExtensionMetadata>
fn metadata() -> Vec<TransactionExtensionMetadata>
Source§fn weight(&self, call: &Config::RuntimeCall) -> Weight
fn weight(&self, call: &Config::RuntimeCall) -> Weight
Source§fn validate(
&self,
origin: Config::RuntimeOrigin,
call: &Config::RuntimeCall,
info: &DispatchInfoOf<Config::RuntimeCall>,
len: usize,
self_implicit: Self::Implicit,
inherited_implication: &impl Implication,
source: TransactionSource,
) -> Result<(ValidTransaction, Self::Val, Config::RuntimeOrigin), TransactionValidityError>
fn validate( &self, origin: Config::RuntimeOrigin, call: &Config::RuntimeCall, info: &DispatchInfoOf<Config::RuntimeCall>, len: usize, self_implicit: Self::Implicit, inherited_implication: &impl Implication, source: TransactionSource, ) -> Result<(ValidTransaction, Self::Val, Config::RuntimeOrigin), TransactionValidityError>
Source§fn prepare(
self,
val: Self::Val,
origin: &Config::RuntimeOrigin,
call: &Config::RuntimeCall,
info: &DispatchInfoOf<Config::RuntimeCall>,
len: usize,
) -> Result<Self::Pre, TransactionValidityError>
fn prepare( self, val: Self::Val, origin: &Config::RuntimeOrigin, call: &Config::RuntimeCall, info: &DispatchInfoOf<Config::RuntimeCall>, len: usize, ) -> Result<Self::Pre, TransactionValidityError>
Source§fn post_dispatch_details(
pre: Self::Pre,
info: &DispatchInfoOf<Config::RuntimeCall>,
post_info: &PostDispatchInfo,
len: usize,
result: &DispatchResult,
) -> Result<Weight, TransactionValidityError>
fn post_dispatch_details( pre: Self::Pre, info: &DispatchInfoOf<Config::RuntimeCall>, post_info: &PostDispatchInfo, len: usize, result: &DispatchResult, ) -> Result<Weight, TransactionValidityError>
Source§fn bare_validate(
call: &Config::RuntimeCall,
info: &DispatchInfoOf<Config::RuntimeCall>,
len: usize,
) -> TransactionValidity
fn bare_validate( call: &Config::RuntimeCall, info: &DispatchInfoOf<Config::RuntimeCall>, len: usize, ) -> TransactionValidity
Source§fn bare_validate_and_prepare(
call: &Config::RuntimeCall,
info: &DispatchInfoOf<Config::RuntimeCall>,
len: usize,
) -> Result<(), TransactionValidityError>
fn bare_validate_and_prepare( call: &Config::RuntimeCall, info: &DispatchInfoOf<Config::RuntimeCall>, len: usize, ) -> Result<(), TransactionValidityError>
Source§fn bare_post_dispatch(
info: &DispatchInfoOf<Config::RuntimeCall>,
post_info: &mut PostDispatchInfoOf<Config::RuntimeCall>,
len: usize,
result: &DispatchResult,
) -> Result<(), TransactionValidityError>
fn bare_post_dispatch( info: &DispatchInfoOf<Config::RuntimeCall>, post_info: &mut PostDispatchInfoOf<Config::RuntimeCall>, len: usize, result: &DispatchResult, ) -> Result<(), TransactionValidityError>
§fn post_dispatch(
pre: Self::Pre,
info: &<Call as Dispatchable>::Info,
post_info: &mut <Call as Dispatchable>::PostInfo,
len: usize,
result: &Result<(), DispatchError>,
) -> Result<(), TransactionValidityError>
fn post_dispatch( pre: Self::Pre, info: &<Call as Dispatchable>::Info, post_info: &mut <Call as Dispatchable>::PostInfo, len: usize, result: &Result<(), DispatchError>, ) -> Result<(), TransactionValidityError>
post_dispatch_details that
refunds the unspent weight consumed by this extension into the post dispatch information. Read moreSource§impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> TypeInfo for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: TypeInfo + 'static,
PhantomData<(Config, TargetBlockRate)>: TypeInfo + 'static,
Config: 'static,
TargetBlockRate: 'static,
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> TypeInfo for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: TypeInfo + 'static,
PhantomData<(Config, TargetBlockRate)>: TypeInfo + 'static,
Config: 'static,
TargetBlockRate: 'static,
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> DecodeWithMemTracking for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: DecodeWithMemTracking,
PhantomData<(Config, TargetBlockRate)>: DecodeWithMemTracking,
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> EncodeLike for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Encode,
PhantomData<(Config, TargetBlockRate)>: Encode,
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Eq for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Eq,
Auto Trait Implementations§
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Freeze for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>where
Inner: Freeze,
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> RefUnwindSafe for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Send for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Sync for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> Unpin for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
impl<Config, Inner, TargetBlockRate, const MAX_TRANSACTION_TO_CONSIDER: u32, const ALLOW_NORMAL: bool> UnwindSafe for DynamicMaxBlockWeight<Config, Inner, TargetBlockRate, MAX_TRANSACTION_TO_CONSIDER, ALLOW_NORMAL>
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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> Clear for T
impl<T> Clear for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Self and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
§impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
§impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
§fn defensive_truncate_into(self) -> U
fn defensive_truncate_into(self) -> U
§impl<T, Call> DispatchTransaction<Call> for Twhere
T: TransactionExtension<Call>,
Call: Dispatchable + Encode,
<Call as Dispatchable>::RuntimeOrigin: AsTransactionAuthorizedOrigin,
impl<T, Call> DispatchTransaction<Call> for Twhere
T: TransactionExtension<Call>,
Call: Dispatchable + Encode,
<Call as Dispatchable>::RuntimeOrigin: AsTransactionAuthorizedOrigin,
§type Result = Result<Result<<Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<Call as Dispatchable>::PostInfo>>, TransactionValidityError>
type Result = Result<Result<<Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<Call as Dispatchable>::PostInfo>>, TransactionValidityError>
§fn validate_only(
&self,
origin: <T as DispatchTransaction<Call>>::Origin,
call: &Call,
info: &<Call as Dispatchable>::Info,
len: usize,
source: TransactionSource,
extension_version: u8,
) -> Result<(ValidTransaction, <T as TransactionExtension<Call>>::Val, <T as DispatchTransaction<Call>>::Origin), TransactionValidityError>
fn validate_only( &self, origin: <T as DispatchTransaction<Call>>::Origin, call: &Call, info: &<Call as Dispatchable>::Info, len: usize, source: TransactionSource, extension_version: u8, ) -> Result<(ValidTransaction, <T as TransactionExtension<Call>>::Val, <T as DispatchTransaction<Call>>::Origin), TransactionValidityError>
§fn validate_and_prepare(
self,
origin: <T as DispatchTransaction<Call>>::Origin,
call: &Call,
info: &<Call as Dispatchable>::Info,
len: usize,
extension_version: u8,
) -> Result<(<T as TransactionExtension<Call>>::Pre, <T as DispatchTransaction<Call>>::Origin), TransactionValidityError>
fn validate_and_prepare( self, origin: <T as DispatchTransaction<Call>>::Origin, call: &Call, info: &<Call as Dispatchable>::Info, len: usize, extension_version: u8, ) -> Result<(<T as TransactionExtension<Call>>::Pre, <T as DispatchTransaction<Call>>::Origin), TransactionValidityError>
§fn dispatch_transaction(
self,
origin: <Call as Dispatchable>::RuntimeOrigin,
call: Call,
info: &<Call as Dispatchable>::Info,
len: usize,
extension_version: u8,
) -> <T as DispatchTransaction<Call>>::Result
fn dispatch_transaction( self, origin: <Call as Dispatchable>::RuntimeOrigin, call: Call, info: &<Call as Dispatchable>::Info, len: usize, extension_version: u8, ) -> <T as DispatchTransaction<Call>>::Result
§fn test_run(
self,
origin: <T as DispatchTransaction<Call>>::Origin,
call: &Call,
info: &<T as DispatchTransaction<Call>>::Info,
len: usize,
extension_version: u8,
substitute: impl FnOnce(<T as DispatchTransaction<Call>>::Origin) -> Result<<Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<Call as Dispatchable>::PostInfo>>,
) -> <T as DispatchTransaction<Call>>::Result
fn test_run( self, origin: <T as DispatchTransaction<Call>>::Origin, call: &Call, info: &<T as DispatchTransaction<Call>>::Info, len: usize, extension_version: u8, substitute: impl FnOnce(<T as DispatchTransaction<Call>>::Origin) -> Result<<Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<Call as Dispatchable>::PostInfo>>, ) -> <T as DispatchTransaction<Call>>::Result
substitute instead. Since this doesn’t actually
dispatch the call, it doesn’t need to consume it and so call can be passed as a reference.§impl<T> EncodeAs<T> for Twhere
T: Encode,
impl<T> EncodeAs<T> for Twhere
T: Encode,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FromFd for T
impl<T> FromFd for T
§impl<T> FromFilelike for T
impl<T> FromFilelike for T
§fn from_filelike(owned: OwnedFd) -> T
fn from_filelike(owned: OwnedFd) -> T
Self from the given filelike object. Read more§fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
Self from the given filelike object
converted from into_owned. Read more§impl<T> FromSocketlike for T
impl<T> FromSocketlike for T
§fn from_socketlike(owned: OwnedFd) -> T
fn from_socketlike(owned: OwnedFd) -> T
Self from the given socketlike object.§fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
Self from the given socketlike object
converted from into_owned.§impl<T> FullLeaf for T
impl<T> FullLeaf for T
§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere
T: Codec,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.