Struct hyperfuel_net_types::Query

source ·
pub struct Query {
    pub from_block: u64,
    pub to_block: Option<u64>,
    pub receipts: Vec<ReceiptSelection>,
    pub inputs: Vec<InputSelection>,
    pub outputs: Vec<OutputSelection>,
    pub include_all_blocks: bool,
    pub field_selection: FieldSelection,
    pub max_num_blocks: Option<usize>,
    pub max_num_transactions: Option<usize>,
}

Fields§

§from_block: u64

The block to start the query from

§to_block: Option<u64>

The block to end the query at. If not specified, the query will go until the end of data. Exclusive, the returned range will be [from_block..to_block).

The query will return before it reaches this target block if it hits the time limit configured on the server. The user should continue their query by putting the next_block field in the response into from_block field of their next query. This implements pagination.

§receipts: Vec<ReceiptSelection>

List of receipt selections, the query will return receipts that match any of these selections and it will return receipts that are related to the returned objects.

§inputs: Vec<InputSelection>

List of input selections, the query will return inputs that match any of these selections and it will return inputs that are related to the returned objects.

§outputs: Vec<OutputSelection>

List of output selections, the query will return outputs that match any of these selections and it will return outputs that are related to the returned objects.

§include_all_blocks: bool

Weather to include all blocks regardless of if they are related to a returned transaction or log. Normally the server will return only the blocks that are related to the transaction or logs in the response. But if this is set to true, the server will return data for all blocks in the requested range [from_block, to_block).

§field_selection: FieldSelection

Field selection. The user can select which fields they are interested in, requesting less fields will improve query execution time and reduce the payload size so the user should always use a minimal number of fields.

§max_num_blocks: Option<usize>

Maximum number of blocks that should be returned, the server might return more blocks than this number but it won’t overshoot by too much.

§max_num_transactions: Option<usize>

Maximum number of transactions that should be returned, the server might return more transactions than this number but it won’t overshoot by too much.

Trait Implementations§

source§

impl Clone for Query

source§

fn clone(&self) -> Query

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Query

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Query

source§

fn default() -> Query

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Query

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Query

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Query

§

impl RefUnwindSafe for Query

§

impl Send for Query

§

impl Sync for Query

§

impl Unpin for Query

§

impl UnwindSafe for Query

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

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