Struct bitcoin::bip152::PrefilledTransaction
source · 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: u16
The 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: Transaction
The actual transaction.
Trait Implementations§
source§impl AsRef<Transaction> for PrefilledTransaction
impl AsRef<Transaction> for PrefilledTransaction
source§fn as_ref(&self) -> &Transaction
fn as_ref(&self) -> &Transaction
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for PrefilledTransaction
impl Clone for PrefilledTransaction
source§fn clone(&self) -> PrefilledTransaction
fn clone(&self) -> PrefilledTransaction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PrefilledTransaction
impl Debug for PrefilledTransaction
source§impl Decodable for PrefilledTransaction
impl Decodable for PrefilledTransaction
source§impl Encodable for PrefilledTransaction
impl Encodable for PrefilledTransaction
source§impl Hash for PrefilledTransaction
impl Hash for PrefilledTransaction
source§impl Ord for PrefilledTransaction
impl Ord for PrefilledTransaction
source§fn cmp(&self, other: &PrefilledTransaction) -> Ordering
fn cmp(&self, other: &PrefilledTransaction) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<PrefilledTransaction> for PrefilledTransaction
impl PartialEq<PrefilledTransaction> for PrefilledTransaction
source§fn eq(&self, other: &PrefilledTransaction) -> bool
fn eq(&self, other: &PrefilledTransaction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PrefilledTransaction> for PrefilledTransaction
impl PartialOrd<PrefilledTransaction> for PrefilledTransaction
source§fn partial_cmp(&self, other: &PrefilledTransaction) -> Option<Ordering>
fn partial_cmp(&self, other: &PrefilledTransaction) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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§
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