Struct AsTransactionExtension

Source
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>

Sourceยง

fn clone(&self) -> AsTransactionExtension<SE>

Returns a copy of the value. Read more
1.0.0 ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl<SE> Debug for AsTransactionExtension<SE>
where SE: Debug + SignedExtension,

Sourceยง

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

impl<SE> Decode for AsTransactionExtension<SE>
where SE: Decode + SignedExtension,

Sourceยง

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,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Sourceยง

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
Sourceยง

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Sourceยง

impl<SE: SignedExtension + Default> Default for AsTransactionExtension<SE>

Sourceยง

fn default() -> Self

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl<SE> Encode for AsTransactionExtension<SE>
where SE: Encode + SignedExtension,

Sourceยง

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, )

Convert self to a slice and append it to the destination.
Sourceยง

fn encode(&self) -> Vec<u8> โ“˜

Convert self to an owned vector.
Sourceยง

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

Calculates the encoded size. Read more
Sourceยง

impl<SE: SignedExtension> From<SE> for AsTransactionExtension<SE>

Sourceยง

fn from(value: SE) -> Self

Converts to this type from the input type.
Sourceยง

impl<SE: PartialEq + SignedExtension> PartialEq for AsTransactionExtension<SE>

Sourceยง

fn eq(&self, other: &AsTransactionExtension<SE>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Sourceยง

impl<SE: SignedExtension> TransactionExtension<<SE as SignedExtension>::Call> for AsTransactionExtension<SE>

Sourceยง

const IDENTIFIER: &'static str = SE::IDENTIFIER

Unique identifier of this signed extension. Read more
Sourceยง

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 Val = ()

The type that encodes information that can be passed from validate to prepare.
Sourceยง

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>

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>

Returns the metadata for this extension. Read more
Sourceยง

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>

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>

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>

Do any post-flight stuff for an extrinsic. Read more
Sourceยง

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>

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>

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>

A wrapper for post_dispatch_details that refunds the unspent weight consumed by this extension into the post dispatch information. Read more
Sourceยง

impl<SE> TypeInfo for AsTransactionExtension<SE>
where SE: TypeInfo + 'static + SignedExtension,

Sourceยง

type Identity = AsTransactionExtension<SE>

The type identifying for which type info is provided. Read more
Sourceยง

fn type_info() -> Type

Returns the static type identifier for Self.
Sourceยง

impl<SE> EncodeLike for AsTransactionExtension<SE>
where SE: Encode + SignedExtension,

Sourceยง

impl<SE: Eq + SignedExtension> Eq for AsTransactionExtension<SE>

Sourceยง

impl<SE: SignedExtension> StructuralPartialEq for AsTransactionExtension<SE>

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CheckedConversion for T

Sourceยง

fn checked_from<T>(t: T) -> Option<Self>
where Self: TryFrom<T>,

Convert from a value of T into an equivalent instance of Option<Self>. Read more
Sourceยง

fn checked_into<T>(self) -> Option<T>
where Self: TryInto<T>,

Consume self to return Some equivalent value of Option<T>. Read more
Sourceยง

impl<T> Clear for T
where T: Default + Eq + PartialEq,

Sourceยง

fn is_clear(&self) -> bool

True iff no bits are set.
Sourceยง

fn clear() -> T

Return the value of Self that is clear.
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dst: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Sourceยง

impl<T> DecodeAll for T
where T: Decode,

Sourceยง

fn decode_all(input: &mut &[u8]) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
Sourceยง

impl<T> DecodeLimit for T
where T: Decode,

Sourceยง

fn decode_all_with_depth_limit( limit: u32, input: &mut &[u8], ) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
Sourceยง

fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>
where I: Input,

Decode Self with the given maximum recursion depth and advance input by the number of bytes consumed. Read more
Sourceยง

impl<T, Call> DispatchTransaction<Call> for T

Sourceยง

type Origin = <Call as Dispatchable>::RuntimeOrigin

The origin type of the transaction.
Sourceยง

type Info = <Call as Dispatchable>::Info

The info type.
Sourceยง

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

The Val of the extension.
Sourceยง

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>

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>

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

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

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<T> DynClone for T
where T: Clone,

Sourceยง

fn __clone_box(&self, _: Private) -> *mut ()

Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoEither for T

Sourceยง

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 more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ“˜
where F: FnOnce(&Self) -> bool,

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
Sourceยง

impl<Src, Dest> IntoTuple<Dest> for Src
where Dest: FromTuple<Src>,

Sourceยง

fn into_tuple(self) -> Dest

Sourceยง

impl<T, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

Sourceยง

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

Sourceยง

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

Sourceยง

impl<T> KeyedVec for T
where T: Codec,

Sourceยง

fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8> โ“˜

Return an encoding of Self prepended by given slice.
Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

impl<T> SaturatedConversion for T

Sourceยง

fn saturated_from<T>(t: T) -> Self
where Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
Sourceยง

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

Sourceยง

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
Sourceยง

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

Sourceยง

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V

Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<S> Codec for S
where S: Decode + Encode,

Sourceยง

impl<T> EncodeLike<&&T> for T
where T: Encode,

Sourceยง

impl<T> EncodeLike<&T> for T
where T: Encode,

Sourceยง

impl<T> EncodeLike<&mut T> for T
where T: Encode,

Sourceยง

impl<T> EncodeLike<Arc<T>> for T
where T: Encode,

Sourceยง

impl<T> EncodeLike<Box<T>> for T
where T: Encode,

Sourceยง

impl<'a, T> EncodeLike<Cow<'a, T>> for T
where T: ToOwned + Encode,

Sourceยง

impl<T> EncodeLike<Rc<T>> for T
where T: Encode,

Sourceยง

impl<S> FullCodec for S
where S: Decode + FullEncode,

Sourceยง

impl<S> FullEncode for S
where S: Encode + EncodeLike,

Sourceยง

impl<T> JsonSchemaMaybe for T

Sourceยง

impl<T> MaybeDebug for T
where T: Debug,

Sourceยง

impl<T> MaybeRefUnwindSafe for T
where T: RefUnwindSafe,

Sourceยง

impl<T> Member for T
where T: Send + Sync + Debug + Eq + PartialEq + Clone + 'static,

Sourceยง

impl<T> StaticTypeInfo for T
where T: TypeInfo + 'static,