pub struct TransactionInfo {
pub auth_info: AuthInfo,
pub call_format: CallFormat,
pub read_only: bool,
pub size: u32,
pub index: usize,
pub hash: Hash,
}Expand description
Information about a transaction that is exposed through the execution environment.
The call method and body are intentionally not part of this information as they are consumed by the dispatcher.
Fields§
§auth_info: AuthInfoTransaction authentication information.
call_format: CallFormatCall format.
read_only: boolRead-only flag.
size: u32Transaction size.
index: usizeTransaction index within the batch.
hash: HashTransaction hash.
Implementations§
Source§impl TransactionInfo
impl TransactionInfo
Sourcepub fn from_tx(
tx: Transaction,
size: u32,
index: usize,
hash: Hash,
) -> (Self, Call)
pub fn from_tx( tx: Transaction, size: u32, index: usize, hash: Hash, ) -> (Self, Call)
Split the given transaction into transaction information and the call to dispatch.
Sourcepub fn internal(tx: Transaction) -> (Self, Call)
pub fn internal(tx: Transaction) -> (Self, Call)
Split the given internally generated transaction into transaction information and the call to dispatch.
Internally generated transactions have zero size, index and hash.
Trait Implementations§
Source§impl Clone for TransactionInfo
impl Clone for TransactionInfo
Source§fn clone(&self) -> TransactionInfo
fn clone(&self) -> TransactionInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TransactionInfo
impl RefUnwindSafe for TransactionInfo
impl Send for TransactionInfo
impl Sync for TransactionInfo
impl Unpin for TransactionInfo
impl UnsafeUnpin for TransactionInfo
impl UnwindSafe for TransactionInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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