Skip to main content

EntityQuery

Enum EntityQuery 

Source
pub enum EntityQuery {
Show 25 variants AllShardsByEpochId { epoch_id: EpochId, }, BlockByHash { block_hash: CryptoHash, }, BlockHashByHeight { block_height: u64, }, BlockHeaderByHash { block_hash: CryptoHash, }, ChunkByHash { chunk_hash: CryptoHash, }, EpochInfoByEpochId { epoch_id: EpochId, }, FlatStateByTrieKey { trie_key: String, shard_uid: ShardUId, }, FlatStateChangesByBlockHash { block_hash: CryptoHash, shard_uid: ShardUId, }, FlatStateDeltaMetadataByBlockHash { block_hash: CryptoHash, shard_uid: ShardUId, }, FlatStorageStatusByShardUId { shard_uid: ShardUId, }, OutcomeByReceiptId { receipt_id: CryptoHash, }, OutcomeByReceiptIdAndBlockHash { receipt_id: CryptoHash, block_hash: CryptoHash, }, OutcomeByTransactionHash { transaction_hash: CryptoHash, }, OutcomeByTransactionHashAndBlockHash { transaction_hash: CryptoHash, block_hash: CryptoHash, }, ReceiptById { receipt_id: CryptoHash, }, ShardIdByAccountId { account_id: String, epoch_id: EpochId, }, ShardLayoutByEpochId { epoch_id: EpochId, }, ShardUIdByShardId { shard_id: u64, epoch_id: EpochId, }, TipAtFinalHead(()), TipAtHead(()), TipAtHeaderHead(()), TransactionByHash { transaction_hash: CryptoHash, }, TrieNode { trie_path: String, }, TrieRootByChunkHash { chunk_hash: CryptoHash, }, TrieRootByStateRoot { state_root: CryptoHash, shard_uid: ShardUId, },
}
Expand description

All queries supported by the Entity Debug UI. To add a new query, make a new enum variant. The only constraints are:

  • The variant must either be (()), or a struct variant whose field names correspond to some EntityKeyType (in the UI code).
  • Across all queries, each unique entity key name must have the same type, e.g. “epoch_id” must always have the same type, in this case ‘EpochId’.

Queries in general can return anything. On the UI side we annotate on the returned structure to provide links for further queries. For example, on the UI side we annotate that TipAtHead returns a structure whose prev_block_hash corresponds to a block_hash entity key, which can then be used to query for e.g. BlockHeaderByHash.

Variants§

§

AllShardsByEpochId

Fields

§epoch_id: EpochId
§

BlockByHash

Fields

§block_hash: CryptoHash
§

BlockHashByHeight

Fields

§block_height: u64
§

BlockHeaderByHash

Fields

§block_hash: CryptoHash
§

ChunkByHash

Fields

§chunk_hash: CryptoHash
§

EpochInfoByEpochId

Fields

§epoch_id: EpochId
§

FlatStateByTrieKey

Fields

§trie_key: String
§shard_uid: ShardUId
§

FlatStateChangesByBlockHash

Fields

§block_hash: CryptoHash
§shard_uid: ShardUId
§

FlatStateDeltaMetadataByBlockHash

Fields

§block_hash: CryptoHash
§shard_uid: ShardUId
§

FlatStorageStatusByShardUId

Fields

§shard_uid: ShardUId
§

OutcomeByReceiptId

Fields

§receipt_id: CryptoHash
§

OutcomeByReceiptIdAndBlockHash

Fields

§receipt_id: CryptoHash
§block_hash: CryptoHash
§

OutcomeByTransactionHash

Fields

§transaction_hash: CryptoHash
§

OutcomeByTransactionHashAndBlockHash

Fields

§transaction_hash: CryptoHash
§block_hash: CryptoHash
§

ReceiptById

Fields

§receipt_id: CryptoHash
§

ShardIdByAccountId

Fields

§account_id: String
§epoch_id: EpochId
§

ShardLayoutByEpochId

Fields

§epoch_id: EpochId
§

ShardUIdByShardId

Fields

§shard_id: u64
§epoch_id: EpochId
§

TipAtFinalHead(())

§

TipAtHead(())

§

TipAtHeaderHead(())

§

TransactionByHash

Fields

§transaction_hash: CryptoHash
§

TrieNode

Fields

§trie_path: String
§

TrieRootByChunkHash

Fields

§chunk_hash: CryptoHash
§

TrieRootByStateRoot

Fields

§state_root: CryptoHash
§shard_uid: ShardUId

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for EntityQuery

Source§

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

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

impl Serialize for EntityQuery

Source§

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more