Struct ethp2p::RequestPair
source · [−]pub struct RequestPair<T> {
pub request_id: u64,
pub message: T,
}
Expand description
This is used for all request-response style eth
protocol messages.
This can represent either a request or a response, since both include a message payload and
request id.
Fields
request_id: u64
id for the contained request or response message
message: T
the request or response message payload
Trait Implementations
sourceimpl<T: Clone> Clone for RequestPair<T>
impl<T: Clone> Clone for RequestPair<T>
sourcefn clone(&self) -> RequestPair<T>
fn clone(&self) -> RequestPair<T>
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<T: Debug> Debug for RequestPair<T>
impl<T: Debug> Debug for RequestPair<T>
sourceimpl<T> Decodable for RequestPair<T>where
T: Decodable,
impl<T> Decodable for RequestPair<T>where
T: Decodable,
Allows messages with request ids to be deserialized into RLP bytes.
sourceimpl<T> Encodable for RequestPair<T>where
T: Encodable,
impl<T> Encodable for RequestPair<T>where
T: Encodable,
Allows messages with request ids to be serialized into RLP bytes.
sourceimpl From<RequestPair<BlockBodies>> for EthMessage
impl From<RequestPair<BlockBodies>> for EthMessage
sourcefn from(t: RequestPair<BlockBodies>) -> Self
fn from(t: RequestPair<BlockBodies>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<BlockBodies>> for Response
impl From<RequestPair<BlockBodies>> for Response
sourcefn from(t: RequestPair<BlockBodies>) -> Self
fn from(t: RequestPair<BlockBodies>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<BlockHeaders>> for EthMessage
impl From<RequestPair<BlockHeaders>> for EthMessage
sourcefn from(t: RequestPair<BlockHeaders>) -> Self
fn from(t: RequestPair<BlockHeaders>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<BlockHeaders>> for Response
impl From<RequestPair<BlockHeaders>> for Response
sourcefn from(t: RequestPair<BlockHeaders>) -> Self
fn from(t: RequestPair<BlockHeaders>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<GetBlockBodies>> for EthMessage
impl From<RequestPair<GetBlockBodies>> for EthMessage
sourcefn from(t: RequestPair<GetBlockBodies>) -> Self
fn from(t: RequestPair<GetBlockBodies>) -> 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 EthMessage
impl From<RequestPair<GetBlockHeaders>> for EthMessage
sourcefn from(t: RequestPair<GetBlockHeaders>) -> Self
fn from(t: RequestPair<GetBlockHeaders>) -> 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 EthMessage
impl From<RequestPair<GetNodeData>> for EthMessage
sourcefn from(t: RequestPair<GetNodeData>) -> Self
fn from(t: RequestPair<GetNodeData>) -> 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 EthMessage
impl From<RequestPair<GetPooledTransactions>> for EthMessage
sourcefn from(t: RequestPair<GetPooledTransactions>) -> Self
fn from(t: RequestPair<GetPooledTransactions>) -> 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 EthMessage
impl From<RequestPair<GetReceipts>> for EthMessage
sourcefn from(t: RequestPair<GetReceipts>) -> Self
fn from(t: RequestPair<GetReceipts>) -> 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<RequestPair<NodeData>> for EthMessage
impl From<RequestPair<NodeData>> for EthMessage
sourcefn from(t: RequestPair<NodeData>) -> Self
fn from(t: RequestPair<NodeData>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<NodeData>> for Response
impl From<RequestPair<NodeData>> for Response
sourcefn from(t: RequestPair<NodeData>) -> Self
fn from(t: RequestPair<NodeData>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<PooledTransactions>> for EthMessage
impl From<RequestPair<PooledTransactions>> for EthMessage
sourcefn from(t: RequestPair<PooledTransactions>) -> Self
fn from(t: RequestPair<PooledTransactions>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<PooledTransactions>> for Response
impl From<RequestPair<PooledTransactions>> for Response
sourcefn from(t: RequestPair<PooledTransactions>) -> Self
fn from(t: RequestPair<PooledTransactions>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<Receipts>> for EthMessage
impl From<RequestPair<Receipts>> for EthMessage
sourcefn from(t: RequestPair<Receipts>) -> Self
fn from(t: RequestPair<Receipts>) -> Self
Converts to this type from the input type.
sourceimpl From<RequestPair<Receipts>> for Response
impl From<RequestPair<Receipts>> for Response
sourcefn from(t: RequestPair<Receipts>) -> Self
fn from(t: RequestPair<Receipts>) -> Self
Converts to this type from the input type.
sourceimpl<T: PartialEq> PartialEq<RequestPair<T>> for RequestPair<T>
impl<T: PartialEq> PartialEq<RequestPair<T>> for RequestPair<T>
sourcefn eq(&self, other: &RequestPair<T>) -> bool
fn eq(&self, other: &RequestPair<T>) -> bool
impl<T: Eq> Eq for RequestPair<T>
impl<T> StructuralEq for RequestPair<T>
impl<T> StructuralPartialEq for RequestPair<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for RequestPair<T>where
T: RefUnwindSafe,
impl<T> Send for RequestPair<T>where
T: Send,
impl<T> Sync for RequestPair<T>where
T: Sync,
impl<T> Unpin for RequestPair<T>where
T: Unpin,
impl<T> UnwindSafe for RequestPair<T>where
T: UnwindSafe,
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