pub struct BlockTransactions {
pub block_hash: BlockHash,
pub transactions: Vec<Transaction>,
}
Expand description
A BlockTransactions structure is used to provide some of the transactions in a block, as requested.
Fields
block_hash: BlockHash
The blockhash of the block which the transactions being provided are in.
transactions: Vec<Transaction>
The transactions provided.
Implementations
sourceimpl BlockTransactions
impl BlockTransactions
sourcepub fn from_request(
request: &BlockTransactionsRequest,
block: &Block
) -> Result<BlockTransactions, TxIndexOutOfRangeError>
pub fn from_request(
request: &BlockTransactionsRequest,
block: &Block
) -> Result<BlockTransactions, TxIndexOutOfRangeError>
Construct a BlockTransactions from a BlockTransactionsRequest and the corresponsing full Block by providing all requested transactions.
Trait Implementations
sourceimpl Clone for BlockTransactions
impl Clone for BlockTransactions
sourcefn clone(&self) -> BlockTransactions
fn clone(&self) -> BlockTransactions
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 BlockTransactions
impl Debug for BlockTransactions
sourceimpl Decodable for BlockTransactions
impl Decodable for BlockTransactions
sourcefn consensus_decode_from_finite_reader<R: Read + ?Sized>(
r: &mut R
) -> Result<BlockTransactions, Error>
fn consensus_decode_from_finite_reader<R: Read + ?Sized>(
r: &mut R
) -> Result<BlockTransactions, Error>
Decode
Self
from a size-limited reader. Read moresourcefn consensus_decode<R: Read + ?Sized>(
r: &mut R
) -> Result<BlockTransactions, Error>
fn consensus_decode<R: Read + ?Sized>(
r: &mut R
) -> Result<BlockTransactions, Error>
Decode an object with a well-defined format. Read more
sourceimpl Encodable for BlockTransactions
impl Encodable for BlockTransactions
sourceimpl Hash for BlockTransactions
impl Hash for BlockTransactions
sourceimpl Ord for BlockTransactions
impl Ord for BlockTransactions
sourcefn cmp(&self, other: &BlockTransactions) -> Ordering
fn cmp(&self, other: &BlockTransactions) -> 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<BlockTransactions> for BlockTransactions
impl PartialEq<BlockTransactions> for BlockTransactions
sourcefn eq(&self, other: &BlockTransactions) -> bool
fn eq(&self, other: &BlockTransactions) -> bool
sourceimpl PartialOrd<BlockTransactions> for BlockTransactions
impl PartialOrd<BlockTransactions> for BlockTransactions
sourcefn partial_cmp(&self, other: &BlockTransactions) -> Option<Ordering>
fn partial_cmp(&self, other: &BlockTransactions) -> 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 BlockTransactions
impl StructuralEq for BlockTransactions
impl StructuralPartialEq for BlockTransactions
Auto Trait Implementations
impl RefUnwindSafe for BlockTransactions
impl Send for BlockTransactions
impl Sync for BlockTransactions
impl Unpin for BlockTransactions
impl UnwindSafe for BlockTransactions
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