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
BlockByHash
Fields
§
block_hash: CryptoHashBlockHashByHeight
BlockHeaderByHash
Fields
§
block_hash: CryptoHashChunkByHash
Fields
§
chunk_hash: CryptoHashEpochInfoByEpochId
FlatStateByTrieKey
FlatStateChangesByBlockHash
FlatStateDeltaMetadataByBlockHash
FlatStorageStatusByShardUId
OutcomeByReceiptId
Fields
§
receipt_id: CryptoHashOutcomeByReceiptIdAndBlockHash
OutcomeByTransactionHash
Fields
§
transaction_hash: CryptoHashOutcomeByTransactionHashAndBlockHash
ReceiptById
Fields
§
receipt_id: CryptoHashShardIdByAccountId
ShardLayoutByEpochId
ShardUIdByShardId
TipAtFinalHead(())
TipAtHead(())
TipAtHeaderHead(())
TransactionByHash
Fields
§
transaction_hash: CryptoHashTrieNode
TrieRootByChunkHash
Fields
§
chunk_hash: CryptoHashTrieRootByStateRoot
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EntityQuery
impl<'de> Deserialize<'de> for EntityQuery
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntityQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
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
impl Serialize for EntityQuery
Source§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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for EntityQuery
impl RefUnwindSafe for EntityQuery
impl Send for EntityQuery
impl Sync for EntityQuery
impl Unpin for EntityQuery
impl UnsafeUnpin for EntityQuery
impl UnwindSafe for EntityQuery
Blanket Implementations§
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
Mutably borrows from an owned value. Read more