Struct ethp2p::PooledTransactions
source · [−]pub struct PooledTransactions(pub Vec<TypedTransaction>);
Expand description
The response to GetPooledTransactions
, containing the transaction bodies associated with
the requested hashes.
This response may not contain all bodies requested, but the bodies should be in the same order as the request’s hashes. Hashes may be skipped, and the client should ensure that each body corresponds to a requested hash. Hashes may need to be re-requested if the bodies are not included in the response.
Tuple Fields
0: Vec<TypedTransaction>
The transaction bodies, each of which should correspond to a requested hash.
Implementations
sourceimpl PooledTransactions
impl PooledTransactions
sourcepub fn split_transactions_by_hashes<T: Clone + Into<[u8; 32]>>(
&self,
hashes: Vec<T>
) -> (Vec<[u8; 32]>, Vec<[u8; 32]>)
pub fn split_transactions_by_hashes<T: Clone + Into<[u8; 32]>>(
&self,
hashes: Vec<T>
) -> (Vec<[u8; 32]>, Vec<[u8; 32]>)
Given a list of hashes, split the hashes into those that match a transaction in the response, and those that do not. Assumes the transactions are in the same order as the request’s hashes.
Trait Implementations
sourceimpl Clone for PooledTransactions
impl Clone for PooledTransactions
sourcefn clone(&self) -> PooledTransactions
fn clone(&self) -> PooledTransactions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for PooledTransactions
impl Debug for PooledTransactions
sourceimpl Decodable for PooledTransactions
impl Decodable for PooledTransactions
sourceimpl Encodable for PooledTransactions
impl Encodable for PooledTransactions
sourceimpl From<PooledTransactions> for Vec<TypedTransaction>
impl From<PooledTransactions> for Vec<TypedTransaction>
sourcefn from(txs: PooledTransactions) -> Self
fn from(txs: PooledTransactions) -> Self
Converts to this type from the input type.
sourceimpl From<Vec<TypedTransaction, Global>> for PooledTransactions
impl From<Vec<TypedTransaction, Global>> for PooledTransactions
sourceimpl PartialEq<PooledTransactions> for PooledTransactions
impl PartialEq<PooledTransactions> for PooledTransactions
sourcefn eq(&self, other: &PooledTransactions) -> bool
fn eq(&self, other: &PooledTransactions) -> bool
impl Eq for PooledTransactions
impl StructuralEq for PooledTransactions
impl StructuralPartialEq for PooledTransactions
Auto Trait Implementations
impl RefUnwindSafe for PooledTransactions
impl Send for PooledTransactions
impl Sync for PooledTransactions
impl Unpin for PooledTransactions
impl UnwindSafe for PooledTransactions
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
sourceimpl<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,
sourcefn 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