pub struct Transaction<Hash, Extrinsic> {
    pub data: Extrinsic,
    pub bytes: usize,
    pub hash: Hash,
    pub priority: Priority,
    pub valid_till: Longevity,
    pub requires: Vec<Tag>,
    pub provides: Vec<Tag>,
    pub propagate: bool,
    pub source: Source,
}
Expand description

Immutable transaction

Fields

data: Extrinsic

Raw extrinsic representing that transaction.

bytes: usize

Number of bytes encoding of the transaction requires.

hash: Hash

Transaction hash (unique)

priority: Priority

Transaction priority (higher = better)

valid_till: Longevity

At which block the transaction becomes invalid?

requires: Vec<Tag>

Tags required by the transaction.

provides: Vec<Tag>

Tags that this transaction provides.

propagate: bool

Should that transaction be propagated.

source: Source

Source of that transaction.

Implementations

Explicit transaction clone.

Transaction should be cloned only if absolutely necessary && we want every reason to be commented. That’s why we Transaction is not Clone, but there’s explicit duplicate method.

Trait Implementations

Performs the conversion.

Formats the value using the given formatter. Read more

Transaction type.

Transaction hash type.

Get the reference to the transaction data.

Get hash of the transaction.

Get priority of the transaction.

Get longevity of the transaction.

Get transaction dependencies.

Get tags that transaction provides.

Return a flag indicating if the transaction should be propagated to other peers.

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. If T::size_of is a constant, consider implementing constant_size as well. Read more

Used to optimize MallocSizeOf implementation for collections like Vec and HashMap to avoid iterating over them unnecessarily. The Self: Sized bound is for object safety. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert from a value of T into an equivalent instance of Option<Self>. Read more

Consume self to return Some equivalent value of Option<T>. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Method to launch a heapsize measurement with a fresh state. Read more

The protocol name as bytes. Transmitted on the network. Read more

Should always be Self

Convert from a value of T into an equivalent instance of Self. Read more

Consume self to return an equivalent value of T. Read more

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca) Read more

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA) Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The counterpart to unchecked_from.

Consume self to return an equivalent value of T.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more