pub struct AsTransactionExtension<SE: SignedExtension>(pub SE);
๐Deprecated: Convert your SignedExtension to a TransactionExtension.
Expand description
Adapter to use a SignedExtension
in the place of a TransactionExtension
.
Tuple Fieldsยง
ยง0: SE
๐Deprecated: Convert your SignedExtension to a TransactionExtension.
Trait Implementationsยง
Sourceยงimpl<SE: Clone + SignedExtension> Clone for AsTransactionExtension<SE>
impl<SE: Clone + SignedExtension> Clone for AsTransactionExtension<SE>
Sourceยงfn clone(&self) -> AsTransactionExtension<SE>
fn clone(&self) -> AsTransactionExtension<SE>
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<SE> Debug for AsTransactionExtension<SE>where
SE: Debug + SignedExtension,
impl<SE> Debug for AsTransactionExtension<SE>where
SE: Debug + SignedExtension,
Sourceยงimpl<SE> Decode for AsTransactionExtension<SE>where
SE: Decode + SignedExtension,
impl<SE> Decode for AsTransactionExtension<SE>where
SE: Decode + SignedExtension,
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>
Attempt to deserialise the value from input.
Sourceยง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,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Sourceยงimpl<SE: SignedExtension + Default> Default for AsTransactionExtension<SE>
impl<SE: SignedExtension + Default> Default for AsTransactionExtension<SE>
Sourceยงimpl<SE> Encode for AsTransactionExtension<SE>where
SE: Encode + SignedExtension,
impl<SE> Encode for AsTransactionExtension<SE>where
SE: Encode + SignedExtension,
Sourceยงfn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
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, )
Convert self to a slice and append it to the destination.
Sourceยงfn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn>(
&self,
f: __CodecUsingEncodedCallback,
) -> __CodecOutputReturn
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
Convert self to a slice and then invoke the given closure with it.
Sourceยงfn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Sourceยงimpl<SE: SignedExtension> From<SE> for AsTransactionExtension<SE>
impl<SE: SignedExtension> From<SE> for AsTransactionExtension<SE>
Sourceยงimpl<SE: PartialEq + SignedExtension> PartialEq for AsTransactionExtension<SE>
impl<SE: PartialEq + SignedExtension> PartialEq for AsTransactionExtension<SE>
Sourceยงfn eq(&self, other: &AsTransactionExtension<SE>) -> bool
fn eq(&self, other: &AsTransactionExtension<SE>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Sourceยงimpl<SE: SignedExtension> TransactionExtension<<SE as SignedExtension>::Call> for AsTransactionExtension<SE>
impl<SE: SignedExtension> TransactionExtension<<SE as SignedExtension>::Call> for AsTransactionExtension<SE>
Sourceยงconst IDENTIFIER: &'static str = SE::IDENTIFIER
const IDENTIFIER: &'static str = SE::IDENTIFIER
Unique identifier of this signed extension. Read more
Sourceยงtype Implicit = <SE as SignedExtension>::AdditionalSigned
type Implicit = <SE as SignedExtension>::AdditionalSigned
Any additional data which was known at the time of transaction construction and can be
useful in authenticating the transaction. This is determined dynamically in part from the
on-chain environment using the
implicit
function and not directly contained in the
transaction itself and therefore is considered โimplicitโ.Sourceยงtype Pre = <SE as SignedExtension>::Pre
type Pre = <SE as SignedExtension>::Pre
The type that encodes information that can be passed from
prepare
to post_dispatch
.Sourceยงfn implicit(&self) -> Result<Self::Implicit, TransactionValidityError>
fn implicit(&self) -> Result<Self::Implicit, TransactionValidityError>
Determine any additional data which was known at the time of transaction construction and
can be useful in authenticating the transaction. The expected usage of this is to include in
any data which is signed and verified as part of transaction validation. Also perform any
pre-signature-verification checks and return an error if needed.
Sourceยงfn metadata() -> Vec<TransactionExtensionMetadata>
fn metadata() -> Vec<TransactionExtensionMetadata>
Returns the metadata for this extension. Read more
Sourceยงfn weight(&self, _call: &SE::Call) -> Weight
fn weight(&self, _call: &SE::Call) -> Weight
The weight consumed by executing this extension instance fully during transaction dispatch.
Sourceยงfn validate(
&self,
origin: <SE::Call as Dispatchable>::RuntimeOrigin,
call: &SE::Call,
info: &DispatchInfoOf<SE::Call>,
len: usize,
_self_implicit: Self::Implicit,
_inherited_implication: &impl Encode,
_source: TransactionSource,
) -> ValidateResult<Self::Val, SE::Call>
fn validate( &self, origin: <SE::Call as Dispatchable>::RuntimeOrigin, call: &SE::Call, info: &DispatchInfoOf<SE::Call>, len: usize, _self_implicit: Self::Implicit, _inherited_implication: &impl Encode, _source: TransactionSource, ) -> ValidateResult<Self::Val, SE::Call>
Validate a transaction for the transaction queue. Read more
Sourceยงfn prepare(
self,
_: (),
origin: &<SE::Call as Dispatchable>::RuntimeOrigin,
call: &SE::Call,
info: &DispatchInfoOf<SE::Call>,
len: usize,
) -> Result<Self::Pre, TransactionValidityError>
fn prepare( self, _: (), origin: &<SE::Call as Dispatchable>::RuntimeOrigin, call: &SE::Call, info: &DispatchInfoOf<SE::Call>, len: usize, ) -> Result<Self::Pre, TransactionValidityError>
Do any pre-flight stuff for a transaction after validation. Read more
Sourceยงfn post_dispatch_details(
pre: Self::Pre,
info: &DispatchInfoOf<SE::Call>,
post_info: &PostDispatchInfoOf<SE::Call>,
len: usize,
result: &DispatchResult,
) -> Result<Weight, TransactionValidityError>
fn post_dispatch_details( pre: Self::Pre, info: &DispatchInfoOf<SE::Call>, post_info: &PostDispatchInfoOf<SE::Call>, len: usize, result: &DispatchResult, ) -> Result<Weight, TransactionValidityError>
Do any post-flight stuff for an extrinsic. Read more
Sourceยงfn bare_validate(
call: &SE::Call,
info: &DispatchInfoOf<SE::Call>,
len: usize,
) -> TransactionValidity
fn bare_validate( call: &SE::Call, info: &DispatchInfoOf<SE::Call>, len: usize, ) -> TransactionValidity
Validation logic for bare extrinsics. Read more
Sourceยงfn bare_validate_and_prepare(
call: &SE::Call,
info: &DispatchInfoOf<SE::Call>,
len: usize,
) -> Result<(), TransactionValidityError>
fn bare_validate_and_prepare( call: &SE::Call, info: &DispatchInfoOf<SE::Call>, len: usize, ) -> Result<(), TransactionValidityError>
All pre-flight logic run before dispatching bare extrinsics. Read more
Sourceยงfn bare_post_dispatch(
info: &DispatchInfoOf<SE::Call>,
post_info: &mut PostDispatchInfoOf<SE::Call>,
len: usize,
result: &DispatchResult,
) -> Result<(), TransactionValidityError>
fn bare_post_dispatch( info: &DispatchInfoOf<SE::Call>, post_info: &mut PostDispatchInfoOf<SE::Call>, len: usize, result: &DispatchResult, ) -> Result<(), TransactionValidityError>
Post dispatch logic run after dispatching bare extrinsics. Read more
Sourceยงfn post_dispatch(
pre: Self::Pre,
info: &DispatchInfoOf<Call>,
post_info: &mut PostDispatchInfoOf<Call>,
len: usize,
result: &DispatchResult,
) -> Result<(), TransactionValidityError>
fn post_dispatch( pre: Self::Pre, info: &DispatchInfoOf<Call>, post_info: &mut PostDispatchInfoOf<Call>, len: usize, result: &DispatchResult, ) -> Result<(), TransactionValidityError>
A wrapper for
post_dispatch_details
that
refunds the unspent weight consumed by this extension into the post dispatch information. Read moreSourceยงimpl<SE> TypeInfo for AsTransactionExtension<SE>where
SE: TypeInfo + 'static + SignedExtension,
impl<SE> TypeInfo for AsTransactionExtension<SE>where
SE: TypeInfo + 'static + SignedExtension,
impl<SE> EncodeLike for AsTransactionExtension<SE>where
SE: Encode + SignedExtension,
impl<SE: Eq + SignedExtension> Eq for AsTransactionExtension<SE>
impl<SE: SignedExtension> StructuralPartialEq for AsTransactionExtension<SE>
Auto Trait Implementationsยง
impl<SE> Freeze for AsTransactionExtension<SE>where
SE: Freeze,
impl<SE> RefUnwindSafe for AsTransactionExtension<SE>where
SE: RefUnwindSafe,
impl<SE> Send for AsTransactionExtension<SE>
impl<SE> Sync for AsTransactionExtension<SE>
impl<SE> Unpin for AsTransactionExtension<SE>where
SE: Unpin,
impl<SE> UnwindSafe for AsTransactionExtension<SE>where
SE: UnwindSafe,
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> CheckedConversion for T
impl<T> CheckedConversion for T
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
Sourceยง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,
Sourceยงtype Origin = <Call as Dispatchable>::RuntimeOrigin
type Origin = <Call as Dispatchable>::RuntimeOrigin
The origin type of the transaction.
Sourceยงtype Info = <Call as Dispatchable>::Info
type Info = <Call as Dispatchable>::Info
The info type.
Sourceยง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>
The resultant type.
Sourceยงtype Val = <T as TransactionExtension<Call>>::Val
type Val = <T as TransactionExtension<Call>>::Val
The
Val
of the extension.Sourceยงtype Pre = <T as TransactionExtension<Call>>::Pre
type Pre = <T as TransactionExtension<Call>>::Pre
The
Pre
of the extension.Sourceยง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>
Just validate a transaction. Read more
Sourceยง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>
Validate and prepare a transaction, ready for dispatch.
Sourceยง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
Dispatch a transaction with the given base origin and call.
Sourceยง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
Do everything which would be done in a dispatch_transaction,
but instead of executing the call, execute
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.Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยง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> โ
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 moreSourceยง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
Sourceยงimpl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Sourceยงimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Sourceยงfn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Sourceยงfn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read moreSourceยงimpl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Sourceยงfn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.Sourceยงimpl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Sourceยงfn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.