[][src]Struct sp_runtime::testing::TestXt

pub struct TestXt<Call, Extra> {
    pub signature: Option<(u64, Extra)>,
    pub call: Call,
}

Test transaction, tuple of (sender, call, signed_extra) with index only used if sender is some.

If sender is some then the transaction is signed otherwise it is unsigned.

Fields

signature: Option<(u64, Extra)>

Signature of the extrinsic.

call: Call

Call of the extrinsic.

Implementations

impl<Call, Extra> TestXt<Call, Extra>[src]

pub fn new(call: Call, signature: Option<(u64, Extra)>) -> Self[src]

Create a new TextXt.

Trait Implementations

impl<Origin, Call, Extra> Applyable for TestXt<Call, Extra> where
    Call: 'static + Sized + Send + Sync + Clone + Eq + Codec + Debug + Dispatchable<Origin = Origin>,
    Extra: SignedExtension<AccountId = u64, Call = Call>,
    Origin: From<Option<u64>>, 
[src]

type Call = Call

Type by which we can dispatch. Restricts the UnsignedValidator type.

pub fn validate<U: ValidateUnsigned<Call = Self::Call>>(
    &self,
    _source: TransactionSource,
    _info: &DispatchInfoOf<Self::Call>,
    _len: usize
) -> TransactionValidity
[src]

Checks to see if this is a valid transaction. It returns information on it if so.

pub fn apply<U: ValidateUnsigned<Call = Self::Call>>(
    self,
    info: &DispatchInfoOf<Self::Call>,
    len: usize
) -> ApplyExtrinsicResultWithInfo<PostDispatchInfoOf<Self::Call>>
[src]

Executes all necessary logic needed prior to dispatch and deconstructs into function call, index and sender.

impl<Call: Codec + Sync + Send, Context, Extra> Checkable<Context> for TestXt<Call, Extra>[src]

type Checked = Self

Returned if check succeeds.

impl<Call: Clone, Extra: Clone> Clone for TestXt<Call, Extra>[src]

impl<Call, Extra> Debug for TestXt<Call, Extra>[src]

impl<Call, Extra> Decode for TestXt<Call, Extra> where
    Option<(u64, Extra)>: Decode,
    Option<(u64, Extra)>: Decode,
    Call: Decode,
    Call: Decode
[src]

impl<Call, Extra> Encode for TestXt<Call, Extra> where
    Option<(u64, Extra)>: Encode,
    Option<(u64, Extra)>: Encode,
    Call: Encode,
    Call: Encode
[src]

impl<Call, Extra> EncodeLike<TestXt<Call, Extra>> for TestXt<Call, Extra> where
    Option<(u64, Extra)>: Encode,
    Option<(u64, Extra)>: Encode,
    Call: Encode,
    Call: Encode
[src]

impl<Call: Eq, Extra: Eq> Eq for TestXt<Call, Extra>[src]

impl<Call: Codec + Sync + Send, Extra> Extrinsic for TestXt<Call, Extra>[src]

type Call = Call

The function call.

type SignaturePayload = (u64, Extra)

The payload we carry for signed extrinsics. Read more

impl<Call, Extra> MallocSizeOf for TestXt<Call, Extra>[src]

impl<Call: PartialEq, Extra: PartialEq> PartialEq<TestXt<Call, Extra>> for TestXt<Call, Extra>[src]

impl<Call, Extra> Serialize for TestXt<Call, Extra> where
    TestXt<Call, Extra>: Encode
[src]

impl<Call, Extra> StructuralEq for TestXt<Call, Extra>[src]

impl<Call, Extra> StructuralPartialEq for TestXt<Call, Extra>[src]

Auto Trait Implementations

impl<Call, Extra> RefUnwindSafe for TestXt<Call, Extra> where
    Call: RefUnwindSafe,
    Extra: RefUnwindSafe
[src]

impl<Call, Extra> Send for TestXt<Call, Extra> where
    Call: Send,
    Extra: Send
[src]

impl<Call, Extra> Sync for TestXt<Call, Extra> where
    Call: Sync,
    Extra: Sync
[src]

impl<Call, Extra> Unpin for TestXt<Call, Extra> where
    Call: Unpin,
    Extra: Unpin
[src]

impl<Call, Extra> UnwindSafe for TestXt<Call, Extra> where
    Call: UnwindSafe,
    Extra: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<S> Codec for S where
    S: Encode + Decode
[src]

impl<T> DecodeAll for T where
    T: Decode
[src]

impl<T> DecodeLimit for T where
    T: Decode
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ mut T> for T where
    T: Encode
[src]

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode
[src]

impl<T> EncodeLike<Box<T, Global>> for T where
    T: Encode
[src]

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

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode
[src]

impl<T> From<T> for T[src]

impl<S> FullCodec for S where
    S: Decode + FullEncode
[src]

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

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> KeyedVec for T where
    T: Codec
[src]

impl<T> MallocSizeOfExt for T where
    T: MallocSizeOf
[src]

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeMallocSizeOf for T where
    T: MallocSizeOf
[src]

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> MaybeSerialize for T where
    T: Serialize
[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

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

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