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§
source§impl<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§
source§impl<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,
source§fn 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.
§fn 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.
§fn 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§
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
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, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> Pointable for T
impl<T> Pointable 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 Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.