Struct sp_runtime::generic::SignedPayload
source · [−]pub struct SignedPayload<Call, Extra: SignedExtension>(_);
Expand description
A payload that has been signed for an unchecked extrinsics.
Note that the payload that we sign to produce unchecked extrinsic signature
is going to be different than the SignaturePayload
- so the thing the extrinsic
actually contains.
Implementations
sourceimpl<Call, Extra> SignedPayload<Call, Extra> where
Call: Encode,
Extra: SignedExtension,
impl<Call, Extra> SignedPayload<Call, Extra> where
Call: Encode,
Extra: SignedExtension,
sourcepub fn new(call: Call, extra: Extra) -> Result<Self, TransactionValidityError>
pub fn new(call: Call, extra: Extra) -> Result<Self, TransactionValidityError>
Create new SignedPayload
.
This function may fail if additional_signed
of Extra
is not available.
sourcepub fn from_raw(
call: Call,
extra: Extra,
additional_signed: Extra::AdditionalSigned
) -> Self
pub fn from_raw(
call: Call,
extra: Extra,
additional_signed: Extra::AdditionalSigned
) -> Self
Create new SignedPayload
from raw components.
sourcepub fn deconstruct(self) -> (Call, Extra, Extra::AdditionalSigned)
pub fn deconstruct(self) -> (Call, Extra, Extra::AdditionalSigned)
Deconstruct the payload into it’s components.
Trait Implementations
sourceimpl<Call, Extra> Encode for SignedPayload<Call, Extra> where
Call: Encode,
Extra: SignedExtension,
impl<Call, Extra> Encode for SignedPayload<Call, Extra> where
Call: Encode,
Extra: SignedExtension,
sourcefn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
Get an encoded version of this payload.
Payloads longer than 256 bytes are going to be blake2_256
-hashed.
sourcefn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
sourcefn encode_to<T>(&self, dest: &mut T) where
T: Output + ?Sized,
fn encode_to<T>(&self, dest: &mut T) where
T: Output + ?Sized,
Convert self to a slice and append it to the destination.
sourcefn encode(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Convert self to an owned vector.
sourcefn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
impl<Call, Extra> EncodeLike<SignedPayload<Call, Extra>> for SignedPayload<Call, Extra> where
Call: Encode,
Extra: SignedExtension,
Auto Trait Implementations
impl<Call, Extra> RefUnwindSafe for SignedPayload<Call, Extra> where
Call: RefUnwindSafe,
Extra: RefUnwindSafe,
<Extra as SignedExtension>::AdditionalSigned: RefUnwindSafe,
impl<Call, Extra> Send for SignedPayload<Call, Extra> where
Call: Send,
<Extra as SignedExtension>::AdditionalSigned: Send,
impl<Call, Extra> Sync for SignedPayload<Call, Extra> where
Call: Sync,
<Extra as SignedExtension>::AdditionalSigned: Sync,
impl<Call, Extra> Unpin for SignedPayload<Call, Extra> where
Call: Unpin,
Extra: Unpin,
<Extra as SignedExtension>::AdditionalSigned: Unpin,
impl<Call, Extra> UnwindSafe for SignedPayload<Call, Extra> where
Call: UnwindSafe,
Extra: UnwindSafe,
<Extra as SignedExtension>::AdditionalSigned: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedConversion for T
impl<T> CheckedConversion for T
sourcefn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
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
sourcefn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
Consume self to return Some
equivalent value of Option<T>
. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
sourcefn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
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
sourcefn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T
. Read more
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.
sourceimpl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
sourcepub fn unique_saturated_into(self) -> T
pub fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of T
.