pub trait RestIndexes: Send + Sync {
// Required methods
fn get_epoch_info(&self, epoch: EpochId) -> Result<Option<EpochInfo>>;
fn get_transaction_info(
&self,
digest: &TransactionDigest,
) -> Result<Option<TransactionInfo>>;
fn account_owned_objects_info_iter(
&self,
owner: IotaAddress,
cursor: Option<ObjectID>,
object_type: Option<StructTag>,
) -> Result<Box<dyn Iterator<Item = Result<AccountOwnedObjectInfo, TypedStoreError>> + '_>>;
fn account_owned_objects_info_iter_v2(
&self,
owner: IotaAddress,
cursor: Option<&OwnedObjectV2Cursor>,
object_type: Option<StructTag>,
) -> Result<Box<dyn Iterator<Item = OwnedObjectV2IteratorItem> + '_>>;
fn dynamic_field_iter(
&self,
parent: ObjectID,
cursor: Option<ObjectID>,
) -> Result<Box<dyn Iterator<Item = Result<(DynamicFieldKey, DynamicFieldIndexInfo), TypedStoreError>> + '_>>;
fn get_coin_info(&self, coin_type: &StructTag) -> Result<Option<CoinInfo>>;
fn get_coin_v2_info(
&self,
coin_type: &StructTag,
) -> Result<Option<CoinInfoV2>>;
fn package_versions_iter(
&self,
original_package_id: ObjectID,
cursor: Option<u64>,
) -> Result<Box<dyn Iterator<Item = PackageVersionIteratorItem> + '_>>;
// Provided methods
fn is_owner_v2_index_ready(&self) -> bool { ... }
fn is_coin_v2_index_ready(&self) -> bool { ... }
fn is_package_version_index_ready(&self) -> bool { ... }
}Required Methods§
fn get_epoch_info(&self, epoch: EpochId) -> Result<Option<EpochInfo>>
fn get_transaction_info( &self, digest: &TransactionDigest, ) -> Result<Option<TransactionInfo>>
Sourcefn account_owned_objects_info_iter(
&self,
owner: IotaAddress,
cursor: Option<ObjectID>,
object_type: Option<StructTag>,
) -> Result<Box<dyn Iterator<Item = Result<AccountOwnedObjectInfo, TypedStoreError>> + '_>>
fn account_owned_objects_info_iter( &self, owner: IotaAddress, cursor: Option<ObjectID>, object_type: Option<StructTag>, ) -> Result<Box<dyn Iterator<Item = Result<AccountOwnedObjectInfo, TypedStoreError>> + '_>>
Returns an iterator over objects owned by owner, optionally filtered
by object_type.
The cursor bound is inclusive: if Some(id) is provided, the
iterator starts at that object ID. Callers that wish to paginate past
a previously-seen cursor must .skip(1) on the returned iterator to
avoid re-returning the cursor item.
Sourcefn account_owned_objects_info_iter_v2(
&self,
owner: IotaAddress,
cursor: Option<&OwnedObjectV2Cursor>,
object_type: Option<StructTag>,
) -> Result<Box<dyn Iterator<Item = OwnedObjectV2IteratorItem> + '_>>
fn account_owned_objects_info_iter_v2( &self, owner: IotaAddress, cursor: Option<&OwnedObjectV2Cursor>, object_type: Option<StructTag>, ) -> Result<Box<dyn Iterator<Item = OwnedObjectV2IteratorItem> + '_>>
Returns an iterator over objects owned by owner, optionally filtered
by object_type.
Each item includes an OwnedObjectV2Cursor that can be stored in an
opaque page token for seek-based cursor resumption.
The cursor bound is inclusive: the iterator starts at the cursor
position. Callers must .skip(1) to get exclusive semantics.
Sourcefn dynamic_field_iter(
&self,
parent: ObjectID,
cursor: Option<ObjectID>,
) -> Result<Box<dyn Iterator<Item = Result<(DynamicFieldKey, DynamicFieldIndexInfo), TypedStoreError>> + '_>>
fn dynamic_field_iter( &self, parent: ObjectID, cursor: Option<ObjectID>, ) -> Result<Box<dyn Iterator<Item = Result<(DynamicFieldKey, DynamicFieldIndexInfo), TypedStoreError>> + '_>>
Returns an iterator over the dynamic fields of parent.
The cursor bound is inclusive: if Some(id) is provided, the
iterator starts at that object ID. Callers that wish to paginate past
a previously-seen cursor must .skip(1) on the returned iterator to
avoid re-returning the cursor item.
fn get_coin_info(&self, coin_type: &StructTag) -> Result<Option<CoinInfo>>
Sourcefn get_coin_v2_info(&self, coin_type: &StructTag) -> Result<Option<CoinInfoV2>>
fn get_coin_v2_info(&self, coin_type: &StructTag) -> Result<Option<CoinInfoV2>>
Returns unified coin info from the coin_v2 table (merges
coin + regulated_coin).
Sourcefn package_versions_iter(
&self,
original_package_id: ObjectID,
cursor: Option<u64>,
) -> Result<Box<dyn Iterator<Item = PackageVersionIteratorItem> + '_>>
fn package_versions_iter( &self, original_package_id: ObjectID, cursor: Option<u64>, ) -> Result<Box<dyn Iterator<Item = PackageVersionIteratorItem> + '_>>
Returns an iterator over the versions of a package identified by
original_package_id.
Provided Methods§
Sourcefn is_owner_v2_index_ready(&self) -> bool
fn is_owner_v2_index_ready(&self) -> bool
Returns true once the owner_v2 backfill has completed.
Sourcefn is_coin_v2_index_ready(&self) -> bool
fn is_coin_v2_index_ready(&self) -> bool
Returns true once the coin_v2 backfill has completed.
Sourcefn is_package_version_index_ready(&self) -> bool
fn is_package_version_index_ready(&self) -> bool
Returns true once the package_version backfill has completed and the
index is ready to serve queries. Defaults to true so that
implementations without a backfill concept (e.g. simulacrum) are
unaffected.