Struct sc_transaction_pool::Transaction
source · 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§
source§impl<Hash: Clone, Extrinsic: Clone> Transaction<Hash, Extrinsic>
impl<Hash: Clone, Extrinsic: Clone> Transaction<Hash, Extrinsic>
Trait Implementations§
source§impl<Hash, Extrinsic> AsRef<Extrinsic> for Transaction<Hash, Extrinsic>
impl<Hash, Extrinsic> AsRef<Extrinsic> for Transaction<Hash, Extrinsic>
source§fn as_ref(&self) -> &Extrinsic
fn as_ref(&self) -> &Extrinsic
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<Hash, Extrinsic> Debug for Transaction<Hash, Extrinsic>where
Hash: Debug,
Extrinsic: Debug,
impl<Hash, Extrinsic> Debug for Transaction<Hash, Extrinsic>where Hash: Debug, Extrinsic: Debug,
source§impl<Hash, Extrinsic> InPoolTransaction for Transaction<Hash, Extrinsic>
impl<Hash, Extrinsic> InPoolTransaction for Transaction<Hash, Extrinsic>
§type Transaction = Extrinsic
type Transaction = Extrinsic
Transaction type.
source§fn data(&self) -> &Extrinsic
fn data(&self) -> &Extrinsic
Get the reference to the transaction data.
source§fn is_propagable(&self) -> bool
fn is_propagable(&self) -> bool
Return a flag indicating if the transaction should be propagated to other peers.
source§impl<Hash: PartialEq, Extrinsic: PartialEq> PartialEq<Transaction<Hash, Extrinsic>> for Transaction<Hash, Extrinsic>
impl<Hash: PartialEq, Extrinsic: PartialEq> PartialEq<Transaction<Hash, Extrinsic>> for Transaction<Hash, Extrinsic>
source§fn eq(&self, other: &Transaction<Hash, Extrinsic>) -> bool
fn eq(&self, other: &Transaction<Hash, Extrinsic>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<Hash: Eq, Extrinsic: Eq> Eq for Transaction<Hash, Extrinsic>
impl<Hash, Extrinsic> StructuralEq for Transaction<Hash, Extrinsic>
impl<Hash, Extrinsic> StructuralPartialEq for Transaction<Hash, Extrinsic>
Auto Trait Implementations§
impl<Hash, Extrinsic> RefUnwindSafe for Transaction<Hash, Extrinsic>where Extrinsic: RefUnwindSafe, Hash: RefUnwindSafe,
impl<Hash, Extrinsic> Send for Transaction<Hash, Extrinsic>where Extrinsic: Send, Hash: Send,
impl<Hash, Extrinsic> Sync for Transaction<Hash, Extrinsic>where Extrinsic: Sync, Hash: Sync,
impl<Hash, Extrinsic> Unpin for Transaction<Hash, Extrinsic>where Extrinsic: Unpin, Hash: Unpin,
impl<Hash, Extrinsic> UnwindSafe for Transaction<Hash, Extrinsic>where Extrinsic: UnwindSafe, Hash: UnwindSafe,
Blanket Implementations§
§impl<T, U> AsByteSlice<T> for Uwhere
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
impl<T, U> AsByteSlice<T> for Uwhere T: ToByteSlice, U: AsRef<[T]> + ?Sized,
fn as_byte_slice(&self) -> &[u8] ⓘ
§impl<U> AsSliceOf for Uwhere
U: AsRef<[u8]> + ?Sized,
impl<U> AsSliceOf for Uwhere U: AsRef<[u8]> + ?Sized,
fn as_slice_of<T>(&self) -> Result<&[T], Error>where T: FromByteSlice,
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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 Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
source§impl<S> ParseFormatted for Swhere
S: AsRef<str>,
impl<S> ParseFormatted for Swhere S: AsRef<str>,
source§fn parse_formatted<F, N>(&self, format: &F) -> Result<N, Error>where
F: Format,
N: FromFormattedStr,
fn parse_formatted<F, N>(&self, format: &F) -> Result<N, Error>where F: Format, N: FromFormattedStr,
Converts
self
(typically a formatted string) into a number (see Examples above).§impl<T> Pointable for T
impl<T> Pointable 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<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)source§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 Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.