Struct UncheckedExtrinsic

Source
pub struct UncheckedExtrinsic<Address, Call, Signature, Extra>
where Extra: SignedExtension,
{ pub signature: Option<(Address, Signature, Extra)>, pub function: Call, }
Expand description

A extrinsic right from the external world. This is unchecked and so can contain a signature.

Fields§

§signature: Option<(Address, Signature, Extra)>

The signature, address, number of extrinsics have come before from the same signer and an era describing the longevity of this transaction, if this is a signed extrinsic.

§function: Call

The function that should be called.

Implementations§

Source§

impl<Address, Call, Signature, Extra: SignedExtension> UncheckedExtrinsic<Address, Call, Signature, Extra>

Source

pub fn new_signed( function: Call, signed: Address, signature: Signature, extra: Extra, ) -> Self

New instance of a signed extrinsic aka “transaction”.

Source

pub fn new_unsigned(function: Call) -> Self

New instance of an unsigned extrinsic aka “inherent”.

Trait Implementations§

Source§

impl<Address, AccountId, Call, Signature, Extra, Lookup> Checkable<Lookup> for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Member + MaybeDisplay, Call: Encode + Member, Signature: Member + Verify, <Signature as Verify>::Signer: IdentifyAccount<AccountId = AccountId>, Extra: SignedExtension<AccountId = AccountId>, AccountId: Member + MaybeDisplay, Lookup: Lookup<Source = Address, Target = AccountId>,

Source§

type Checked = CheckedExtrinsic<AccountId, Call, Extra>

Returned if check succeeds.
Source§

fn check( self, lookup: &Lookup, ) -> Result<Self::Checked, TransactionValidityError>

Check self, given an instance of Context.
Source§

impl<Address: Clone, Call: Clone, Signature: Clone, Extra> Clone for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Extra: SignedExtension + Clone,

Source§

fn clone(&self) -> UncheckedExtrinsic<Address, Call, Signature, Extra>

Returns a duplicate 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<Address, Call, Signature, Extra> Debug for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Debug, Call: Debug, Extra: SignedExtension,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<Address, Call, Signature, Extra> Decode for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Decode, Signature: Decode, Call: Decode, Extra: SignedExtension,

Source§

fn decode<I: Input>(input: &mut I) -> Result<Self, Error>

Attempt to deserialise the value from input.
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<'a, Address: Decode, Signature: Decode, Call: Decode, Extra: SignedExtension> Deserialize<'a> for UncheckedExtrinsic<Address, Call, Signature, Extra>

Source§

fn deserialize<D>(de: D) -> Result<Self, D::Error>
where D: Deserializer<'a>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<Address, Call, Signature, Extra> Encode for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Encode, Signature: Encode, Call: Encode, Extra: SignedExtension,

Source§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
Source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
Source§

fn encode_to<T>(&self, dest: &mut T)
where T: Output + ?Sized,

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

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

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<Address, Call, Signature, Extra: SignedExtension> Extrinsic for UncheckedExtrinsic<Address, Call, Signature, Extra>

Source§

type Call = Call

The function call.
Source§

type SignaturePayload = (Address, Signature, Extra)

The payload we carry for signed extrinsics. Read more
Source§

fn is_signed(&self) -> Option<bool>

Is this Extrinsic signed? If no information are available about signed/unsigned, None should be returned.
Source§

fn new( function: Call, signed_data: Option<Self::SignaturePayload>, ) -> Option<Self>

Create new instance of the extrinsic. Read more
Source§

impl<Address, Call, Signature, Extra> ExtrinsicMetadata for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Extra: SignedExtension,

Source§

const VERSION: u8 = 4u8

The version of the Extrinsic.
Source§

type SignedExtensions = Extra

Signed extensions attached to this Extrinsic.
Source§

impl<Address, Call, Signature, Extra> From<UncheckedExtrinsic<Address, Call, Signature, Extra>> for OpaqueExtrinsic
where Address: Encode, Signature: Encode, Call: Encode, Extra: SignedExtension,

Source§

fn from(extrinsic: UncheckedExtrinsic<Address, Call, Signature, Extra>) -> Self

Converts to this type from the input type.
Source§

impl<Address, Call, Signature, Extra> MallocSizeOf for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Extra: SignedExtension,

Source§

fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. If T::size_of is a constant, consider implementing constant_size as well.
Source§

fn constant_size() -> Option<usize>
where Self: Sized,

Used to optimize MallocSizeOf implementation for collections like Vec and HashMap to avoid iterating over them unnecessarily. The Self: Sized bound is for object safety.
Source§

impl<Address: PartialEq, Call: PartialEq, Signature: PartialEq, Extra> PartialEq for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Extra: SignedExtension + PartialEq,

Source§

fn eq( &self, other: &UncheckedExtrinsic<Address, Call, Signature, Extra>, ) -> 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<Address: Encode, Signature: Encode, Call: Encode, Extra: SignedExtension> Serialize for UncheckedExtrinsic<Address, Call, Signature, Extra>

Source§

fn serialize<S>(&self, seq: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<Address, Call, Signature, Extra> EncodeLike for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Encode, Signature: Encode, Call: Encode, Extra: SignedExtension,

Source§

impl<Address: Eq, Call: Eq, Signature: Eq, Extra> Eq for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Extra: SignedExtension + Eq,

Source§

impl<Address, Call, Signature, Extra> StructuralPartialEq for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Extra: SignedExtension,

Auto Trait Implementations§

§

impl<Address, Call, Signature, Extra> Freeze for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Call: Freeze, Address: Freeze, Signature: Freeze, Extra: Freeze,

§

impl<Address, Call, Signature, Extra> RefUnwindSafe for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Call: RefUnwindSafe, Address: RefUnwindSafe, Signature: RefUnwindSafe, Extra: RefUnwindSafe,

§

impl<Address, Call, Signature, Extra> Send for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Call: Send, Address: Send, Signature: Send,

§

impl<Address, Call, Signature, Extra> Sync for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Call: Sync, Address: Sync, Signature: Sync,

§

impl<Address, Call, Signature, Extra> Unpin for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Call: Unpin, Address: Unpin, Signature: Unpin, Extra: Unpin,

§

impl<Address, Call, Signature, Extra> UnwindSafe for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Call: UnwindSafe, Address: UnwindSafe, Signature: UnwindSafe, Extra: UnwindSafe,

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

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

fn decode_all(input: &[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: &[u8]) -> Result<T, Error>

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

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

Decode Self with the given maximum recursion depth. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

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

Source§

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

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<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> MallocSizeOfExt for T
where T: MallocSizeOf,

Source§

fn malloc_size_of(&self) -> usize

Method to launch a heapsize measurement with a fresh state.
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> MaybeDebug for T
where T: Debug,

Source§

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

Source§

impl<T> MaybeMallocSizeOf for T
where T: MallocSizeOf,

Source§

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

Source§

impl<T> MaybeSerialize for T
where T: Serialize,

Source§

impl<T> MaybeSerializeDeserialize for T

Source§

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