pub enum Request {
Status(Status),
NewBlockHashes(NewBlockHashes),
NewBlock(Box<NewBlock>),
Transactions(Transactions),
NewPooledTransactionHashes(NewPooledTransactionHashes),
GetBlockHeaders(RequestPair<GetBlockHeaders>),
GetBlockBodies(RequestPair<GetBlockBodies>),
GetPooledTransactions(RequestPair<GetPooledTransactions>),
GetNodeData(RequestPair<GetNodeData>),
GetReceipts(RequestPair<GetReceipts>),
}
Expand description
An ethereum network request for version 66.
The network layer aims to abstract away the details of the Ethereum wire
protocol into a clear request/response API. Each Request
documents the
possible Response
s it can generate; it is fine (and
recommended!) to match on the expected responses and treat the others as
unreachable!()
, since their return indicates a bug in the network code.
Variants
Status(Status)
The Status
message sent as part of the eth protocol handshake.
Response
A peer should return a Response::Status
in response to complete the
protocol handshake.
NewBlockHashes(NewBlockHashes)
NewBlock(Box<NewBlock>)
Transactions(Transactions)
NewPooledTransactionHashes(NewPooledTransactionHashes)
GetBlockHeaders(RequestPair<GetBlockHeaders>)
GetBlockBodies(RequestPair<GetBlockBodies>)
GetPooledTransactions(RequestPair<GetPooledTransactions>)
GetNodeData(RequestPair<GetNodeData>)
GetReceipts(RequestPair<GetReceipts>)
Trait Implementations
sourceimpl From<NewBlockHashes> for Request
impl From<NewBlockHashes> for Request
sourcefn from(t: NewBlockHashes) -> Self
fn from(t: NewBlockHashes) -> Self
Converts to this type from the input type.
sourceimpl From<NewPooledTransactionHashes> for Request
impl From<NewPooledTransactionHashes> for Request
sourcefn from(t: NewPooledTransactionHashes) -> Self
fn from(t: NewPooledTransactionHashes) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<GetBlockBodies>> for Request
impl From<RequestPair<GetBlockBodies>> for Request
sourcefn from(t: RequestPair<GetBlockBodies>) -> Self
fn from(t: RequestPair<GetBlockBodies>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<GetBlockHeaders>> for Request
impl From<RequestPair<GetBlockHeaders>> for Request
sourcefn from(t: RequestPair<GetBlockHeaders>) -> Self
fn from(t: RequestPair<GetBlockHeaders>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<GetNodeData>> for Request
impl From<RequestPair<GetNodeData>> for Request
sourcefn from(t: RequestPair<GetNodeData>) -> Self
fn from(t: RequestPair<GetNodeData>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<GetPooledTransactions>> for Request
impl From<RequestPair<GetPooledTransactions>> for Request
sourcefn from(t: RequestPair<GetPooledTransactions>) -> Self
fn from(t: RequestPair<GetPooledTransactions>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<GetReceipts>> for Request
impl From<RequestPair<GetReceipts>> for Request
sourcefn from(t: RequestPair<GetReceipts>) -> Self
fn from(t: RequestPair<GetReceipts>) -> Self
Converts to this type from the input type.
sourceimpl From<Transactions> for Request
impl From<Transactions> for Request
sourcefn from(t: Transactions) -> Self
fn from(t: Transactions) -> Self
Converts to this type from the input type.
impl Eq for Request
impl StructuralEq for Request
impl StructuralPartialEq for Request
Auto Trait Implementations
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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