pub struct Extrinsic<'info, TypeId> { /* private fields */ }
Expand description
Information about the extrinsic.
Implementations§
Source§impl<'info, TypeId> Extrinsic<'info, TypeId>
impl<'info, TypeId> Extrinsic<'info, TypeId>
Sourcepub fn into_owned(self) -> ExtrinsicOwned<TypeId>
pub fn into_owned(self) -> ExtrinsicOwned<TypeId>
Take ownership of the extrinsic, so that it no longer references the extrinsic info or bytes.
Sourcepub fn ty(&self) -> ExtrinsicType
pub fn ty(&self) -> ExtrinsicType
The type of the extrinsic.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
The length of the extrinsic payload, excluding the prefixed compact-encoded length bytes.
Sourcepub fn pallet_name(&self) -> &str
pub fn pallet_name(&self) -> &str
The name of the pallet that this extrinsic is calling into.
Sourcepub fn pallet_index(&self) -> u8
pub fn pallet_index(&self) -> u8
the index of the pallet that this extrinsic is calling into.
Sourcepub fn call_index(&self) -> u8
pub fn call_index(&self) -> u8
the index of the call that the extrinsic is making.
Sourcepub fn signature_payload(&self) -> Option<&ExtrinsicSignature<TypeId>>
pub fn signature_payload(&self) -> Option<&ExtrinsicSignature<TypeId>>
Return the extrinsic signature payload, if present. This contains the address and signature information.
Sourcepub fn transaction_extension_payload(
&self,
) -> Option<&ExtrinsicExtensions<'info, TypeId>>
pub fn transaction_extension_payload( &self, ) -> Option<&ExtrinsicExtensions<'info, TypeId>>
Return the transaction extension payload, if present. This contains the transaction extensions.
Sourcepub fn call_data(
&self,
) -> impl ExactSizeIterator<Item = &NamedArg<'info, TypeId>>
pub fn call_data( &self, ) -> impl ExactSizeIterator<Item = &NamedArg<'info, TypeId>>
Iterate over the call data argument names and types.
Sourcepub fn call_data_range(&self) -> Range<usize>
pub fn call_data_range(&self) -> Range<usize>
Return a range denoting the call data bytes. This includes the pallet index and call index bytes and then any encoded arguments for the call.
Sourcepub fn call_data_args_range(&self) -> Range<usize>
pub fn call_data_args_range(&self) -> Range<usize>
Return a range denoting the arguments given to the call. This does not include the pallet index and call index bytes.
Sourcepub fn map_type_id<NewTypeId, F>(self, f: F) -> Extrinsic<'info, NewTypeId>where
F: FnMut(TypeId) -> NewTypeId,
pub fn map_type_id<NewTypeId, F>(self, f: F) -> Extrinsic<'info, NewTypeId>where
F: FnMut(TypeId) -> NewTypeId,
Map the signature type IDs to something else.
Trait Implementations§
Auto Trait Implementations§
impl<'info, TypeId> Freeze for Extrinsic<'info, TypeId>where
TypeId: Freeze,
impl<'info, TypeId> RefUnwindSafe for Extrinsic<'info, TypeId>where
TypeId: RefUnwindSafe,
impl<'info, TypeId> Send for Extrinsic<'info, TypeId>where
TypeId: Send,
impl<'info, TypeId> Sync for Extrinsic<'info, TypeId>where
TypeId: Sync,
impl<'info, TypeId> Unpin for Extrinsic<'info, TypeId>where
TypeId: Unpin,
impl<'info, TypeId> UnwindSafe for Extrinsic<'info, TypeId>where
TypeId: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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