pub struct PrefilledTransaction {
pub idx: u16,
pub tx: Transaction,
}Expand description
A PrefilledTransaction structure is used in HeaderAndShortIds to provide a list of a few transactions explicitly.
Fields
idx: u16The index of the transaction in the block.
This field is differentially encoded relative to the previous prefilled transaction as described as follows:
Several uses of CompactSize below are “differentially encoded”. For these, instead of using raw indexes, the number encoded is the difference between the current index and the previous index, minus one. For example, a first index of 0 implies a real index of 0, a second index of 0 thereafter refers to a real index of 1, etc.
tx: TransactionThe actual transaction.
Trait Implementations
sourceimpl AsRef<Transaction> for PrefilledTransaction
impl AsRef<Transaction> for PrefilledTransaction
sourcefn as_ref(&self) -> &Transaction
fn as_ref(&self) -> &Transaction
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Clone for PrefilledTransaction
impl Clone for PrefilledTransaction
sourcefn clone(&self) -> PrefilledTransaction
fn clone(&self) -> PrefilledTransaction
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for PrefilledTransaction
impl Debug for PrefilledTransaction
sourceimpl Decodable for PrefilledTransaction
impl Decodable for PrefilledTransaction
sourceimpl Encodable for PrefilledTransaction
impl Encodable for PrefilledTransaction
sourceimpl Hash for PrefilledTransaction
impl Hash for PrefilledTransaction
sourceimpl Ord for PrefilledTransaction
impl Ord for PrefilledTransaction
sourcefn cmp(&self, other: &PrefilledTransaction) -> Ordering
fn cmp(&self, other: &PrefilledTransaction) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Selfwhere
Self: Sized,
const fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Selfwhere
Self: Sized,
const fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<PrefilledTransaction> for PrefilledTransaction
impl PartialEq<PrefilledTransaction> for PrefilledTransaction
sourcefn eq(&self, other: &PrefilledTransaction) -> bool
fn eq(&self, other: &PrefilledTransaction) -> bool
sourceimpl PartialOrd<PrefilledTransaction> for PrefilledTransaction
impl PartialOrd<PrefilledTransaction> for PrefilledTransaction
sourcefn partial_cmp(&self, other: &PrefilledTransaction) -> Option<Ordering>
fn partial_cmp(&self, other: &PrefilledTransaction) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for PrefilledTransaction
impl StructuralEq for PrefilledTransaction
impl StructuralPartialEq for PrefilledTransaction
Auto Trait Implementations
impl RefUnwindSafe for PrefilledTransaction
impl Send for PrefilledTransaction
impl Sync for PrefilledTransaction
impl Unpin for PrefilledTransaction
impl UnwindSafe for PrefilledTransaction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more