pub struct GetBlockHeaders {
pub start_block: BlockHashOrNumber,
pub limit: u64,
pub skip: u32,
pub direction: HeadersDirection,
}Expand description
A request for a peer to return block headers starting at the requested block.
The peer must return at most limit headers.
If the reverse field is true, the headers will be returned starting
at start_block, traversing towards the genesis block.
Otherwise, headers will be returned starting at start_block,
traversing towards the latest block.
If the skip field is non-zero, the peer must skip that amount of headers
in the direction specified by reverse.
Fields§
§start_block: BlockHashOrNumberThe block number or hash that the peer should start returning headers from.
limit: u64The maximum number of headers to return.
skip: u32The number of blocks that the node should skip while traversing and returning headers.
A skip value of zero denotes that the peer should return contiguous headers, starting from
start_block and returning at most
limit headers.
direction: HeadersDirectionThe direction in which the headers should be returned in.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for GetBlockHeaders
impl<'arbitrary> Arbitrary<'arbitrary> for GetBlockHeaders
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§impl Clone for GetBlockHeaders
impl Clone for GetBlockHeaders
impl Copy for GetBlockHeaders
Source§impl Debug for GetBlockHeaders
impl Debug for GetBlockHeaders
Source§impl Decodable for GetBlockHeaders
impl Decodable for GetBlockHeaders
Source§impl<'de> Deserialize<'de> for GetBlockHeaders
impl<'de> Deserialize<'de> for GetBlockHeaders
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Encodable for GetBlockHeaders
impl Encodable for GetBlockHeaders
impl Eq for GetBlockHeaders
Source§impl Hash for GetBlockHeaders
impl Hash for GetBlockHeaders
Source§impl PartialEq for GetBlockHeaders
impl PartialEq for GetBlockHeaders
Source§impl Serialize for GetBlockHeaders
impl Serialize for GetBlockHeaders
impl StructuralPartialEq for GetBlockHeaders
Auto Trait Implementations§
impl Freeze for GetBlockHeaders
impl RefUnwindSafe for GetBlockHeaders
impl Send for GetBlockHeaders
impl Sync for GetBlockHeaders
impl Unpin for GetBlockHeaders
impl UnsafeUnpin for GetBlockHeaders
impl UnwindSafe for GetBlockHeaders
Blanket Implementations§
impl<A> ArbInterop for A
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSerde for Twhere
T: Serialize + for<'de> Deserialize<'de>,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes