Struct core_primitives::generic::SignedPayload
pub struct SignedPayload<Call, Extra>((Call, Extra, <Extra as SignedExtension>::AdditionalSigned))
where
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.
Tuple Fields§
§0: (Call, Extra, <Extra as SignedExtension>::AdditionalSigned)
Implementations§
§impl<Call, Extra> SignedPayload<Call, Extra>where
Call: Encode,
Extra: SignedExtension,
impl<Call, Extra> SignedPayload<Call, Extra>where
Call: Encode,
Extra: SignedExtension,
pub fn new(
call: Call,
extra: Extra
) -> Result<SignedPayload<Call, Extra>, TransactionValidityError>
pub fn new( call: Call, extra: Extra ) -> Result<SignedPayload<Call, Extra>, TransactionValidityError>
Create new SignedPayload
.
This function may fail if additional_signed
of Extra
is not available.
pub fn from_raw(
call: Call,
extra: Extra,
additional_signed: <Extra as SignedExtension>::AdditionalSigned
) -> SignedPayload<Call, Extra>
pub fn from_raw( call: Call, extra: Extra, additional_signed: <Extra as SignedExtension>::AdditionalSigned ) -> SignedPayload<Call, Extra>
Create new SignedPayload
from raw components.
pub fn deconstruct(
self
) -> (Call, Extra, <Extra as SignedExtension>::AdditionalSigned)
pub fn deconstruct( self ) -> (Call, Extra, <Extra as SignedExtension>::AdditionalSigned)
Deconstruct the payload into it’s components.
Trait Implementations§
§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,
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&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 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>
impl<Call, Extra> Sync for SignedPayload<Call, Extra>
impl<Call, Extra> Unpin for SignedPayload<Call, Extra>
impl<Call, Extra> UnwindSafe for SignedPayload<Call, Extra>where
Call: UnwindSafe,
Extra: 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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§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 more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.