pub trait Tables {
// Required methods
fn transaction_blobs(&self) -> &impl DatabaseRo<TransactionBlobs>;
fn transaction_infos(&self) -> &impl DatabaseRo<TransactionInfos>;
fn cached_verification_state(
&self,
) -> &impl DatabaseRo<CachedVerificationState>;
fn spent_key_images(&self) -> &impl DatabaseRo<SpentKeyImages>;
fn known_blob_hashes(&self) -> &impl DatabaseRo<KnownBlobHashes>;
fn all_tables_empty(&self) -> Result<bool, RuntimeError>;
}
Expand description
Object containing all opened Table
s in read-only mode.
This is an encapsulated object that contains all
available Table
’s in read-only mode.
It is a Sealed
trait and is only implemented on a
(tuple, containing, all, table, types, ...)
.
This is used to return a single object from functions like
OpenTables::open_tables
rather than the tuple containing the tables itself.
To replace tuple.0
style indexing, field_accessor_functions()
are provided on this trait, which essentially map the object to
fields containing the particular database table, for example:
let tables = open_tables();
// The accessor function `block_infos()` returns the field
// containing an open database table for `BlockInfos`.
let _ = tables.block_infos();
See also:
Required Methods§
Sourcefn transaction_blobs(&self) -> &impl DatabaseRo<TransactionBlobs>
fn transaction_blobs(&self) -> &impl DatabaseRo<TransactionBlobs>
Access an opened
TransactionBlobs
database.
Sourcefn transaction_infos(&self) -> &impl DatabaseRo<TransactionInfos>
fn transaction_infos(&self) -> &impl DatabaseRo<TransactionInfos>
Access an opened
TransactionInfos
database.
Sourcefn cached_verification_state(&self) -> &impl DatabaseRo<CachedVerificationState>
fn cached_verification_state(&self) -> &impl DatabaseRo<CachedVerificationState>
Access an opened
CachedVerificationState
database.
Sourcefn spent_key_images(&self) -> &impl DatabaseRo<SpentKeyImages>
fn spent_key_images(&self) -> &impl DatabaseRo<SpentKeyImages>
Access an opened
SpentKeyImages
database.
Sourcefn known_blob_hashes(&self) -> &impl DatabaseRo<KnownBlobHashes>
fn known_blob_hashes(&self) -> &impl DatabaseRo<KnownBlobHashes>
Access an opened
KnownBlobHashes
database.
Sourcefn all_tables_empty(&self) -> Result<bool, RuntimeError>
fn all_tables_empty(&self) -> Result<bool, RuntimeError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.