[][src]Struct exonum_explorer::api::BlocksQuery

#[non_exhaustive]pub struct BlocksQuery {
    pub count: usize,
    pub latest: Option<Height>,
    pub earliest: Option<Height>,
    pub skip_empty_blocks: bool,
    pub add_blocks_time: bool,
    pub add_precommits: bool,
}

Blocks in range parameters.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
count: usize

The number of blocks to return. Should not be greater than MAX_BLOCKS_PER_REQUEST.

latest: Option<Height>

The maximum height of the returned blocks.

The blocks are returned in reverse order, starting from the latest and at least up to the latest - count + 1. The default value is the height of the latest block in the blockchain.

earliest: Option<Height>

The minimum height of the returned blocks. The default value is Height(0) (the genesis block).

Note that earliest has the least priority compared to latest and count; it can only truncate the list of otherwise returned blocks if some of them have a lesser height.

skip_empty_blocks: bool

If true, then only non-empty blocks are returned. The default value is false.

add_blocks_time: bool

If true, then the time field in each returned block will contain the median time from the block precommits.

add_precommits: bool

If true, then the precommits field in each returned block will contain precommits for the block stored by the node.

Trait Implementations

impl Clone for BlocksQuery[src]

impl Debug for BlocksQuery[src]

impl Default for BlocksQuery[src]

impl<'de> Deserialize<'de> for BlocksQuery[src]

impl PartialEq<BlocksQuery> for BlocksQuery[src]

impl Serialize for BlocksQuery[src]

impl StructuralPartialEq for BlocksQuery[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,