Struct sp_runtime::generic::SignedPayload
source · pub struct SignedPayload<Call, Extra: SignedExtension>(/* private fields */);
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.
source§fn size_hint(&self) -> usize
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)
fn encode_to<T>(&self, dest: &mut T)
Convert self to a slice and append it to the destination.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
impl<Call, Extra> EncodeLike for SignedPayload<Call, Extra>where
Call: Encode,
Extra: SignedExtension,
Auto Trait Implementations§
impl<Call, Extra> Freeze for SignedPayload<Call, Extra>
impl<Call, Extra> RefUnwindSafe for SignedPayload<Call, Extra>where
Extra: StaticTypeInfo + TypeInfo + PartialEq + Eq + Clone + Send + Sync + Debug + Codec + Encode + Decode + 'static + RefUnwindSafe,
Call: RefUnwindSafe,
<Extra as SignedExtension>::AdditionalSigned: RefUnwindSafe,
impl<Call, Extra> Send for SignedPayload<Call, Extra>where
Extra: StaticTypeInfo + TypeInfo + PartialEq + Eq + Clone + Send + Sync + Debug + Codec + Encode + Decode + 'static,
Call: Send,
<Extra as SignedExtension>::AdditionalSigned: Send,
impl<Call, Extra> Sync for SignedPayload<Call, Extra>where
Extra: StaticTypeInfo + TypeInfo + PartialEq + Eq + Clone + Send + Sync + Debug + Codec + Encode + Decode + 'static,
Call: Sync,
<Extra as SignedExtension>::AdditionalSigned: Sync,
impl<Call, Extra> Unpin for SignedPayload<Call, Extra>
impl<Call, Extra> UnwindSafe for SignedPayload<Call, Extra>where
Extra: StaticTypeInfo + TypeInfo + PartialEq + Eq + Clone + Send + Sync + Debug + Codec + Encode + Decode + 'static + UnwindSafe,
Call: UnwindSafe,
<Extra as SignedExtension>::AdditionalSigned: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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 T
impl<T, Outer> IsWrappedBy<Outer> 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 S
impl<T, S> UniqueSaturatedInto<T> for S
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.