Struct sc_transaction_pool::Transaction [−][src]
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
Trait Implementations
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,
type Transaction = Extrinsic
type Transaction = Extrinsic
Transaction type.
type Hash = Hash
type Hash = Hash
Transaction hash type.
Return a flag indicating if the transaction should be propagated to other peers.
impl<Hash, Extrinsic> MallocSizeOf for Transaction<Hash, Extrinsic> where
Hash: MallocSizeOf,
Extrinsic: MallocSizeOf,
impl<Hash, Extrinsic> MallocSizeOf for Transaction<Hash, Extrinsic> where
Hash: MallocSizeOf,
Extrinsic: MallocSizeOf,
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
fn constant_size() -> Option<usize>
fn constant_size() -> Option<usize>
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
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>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
pub fn as_byte_slice(&self) -> &[u8]
pub fn as_slice_of<T>(&self) -> Result<&[T], Error> where
T: FromByteSlice,
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn malloc_size_of(&self) -> usize
fn malloc_size_of(&self) -> usize
Method to launch a heapsize measurement with a fresh state. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
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
impl<T> MaybeDebug for T where
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,