Struct GetBlockHeaders
pub struct GetBlockHeaders {
pub start_block: HashOrNumber,
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: HashOrNumberThe 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§
§impl<'arbitrary> Arbitrary<'arbitrary> for GetBlockHeaders
impl<'arbitrary> Arbitrary<'arbitrary> for GetBlockHeaders
§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<GetBlockHeaders, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<GetBlockHeaders, Error>
Self from the given unstructured data. Read more§fn arbitrary_take_rest(
u: Unstructured<'arbitrary>,
) -> Result<GetBlockHeaders, Error>
fn arbitrary_take_rest( u: Unstructured<'arbitrary>, ) -> Result<GetBlockHeaders, Error>
Self from the entirety of the given
unstructured data. Read more§impl Clone for GetBlockHeaders
impl Clone for GetBlockHeaders
§fn clone(&self) -> GetBlockHeaders
fn clone(&self) -> GetBlockHeaders
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GetBlockHeaders
§impl Debug for GetBlockHeaders
impl Debug for GetBlockHeaders
§impl Decodable for GetBlockHeaders
impl Decodable for GetBlockHeaders
§fn decode(b: &mut &[u8]) -> Result<GetBlockHeaders, Error>
fn decode(b: &mut &[u8]) -> Result<GetBlockHeaders, Error>
buf must be advanced past
the decoded object.§impl<'de> Deserialize<'de> for GetBlockHeaders
impl<'de> Deserialize<'de> for GetBlockHeaders
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetBlockHeaders, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetBlockHeaders, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Encodable for GetBlockHeaders
impl Encodable for GetBlockHeaders
impl Eq for GetBlockHeaders
§impl Hash for GetBlockHeaders
impl Hash for GetBlockHeaders
§impl PartialEq for GetBlockHeaders
impl PartialEq for GetBlockHeaders
§impl Serialize for GetBlockHeaders
impl Serialize for GetBlockHeaders
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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