pub trait ConsignmentApi {
// Required methods
fn schema(&self) -> &Schema;
fn types(&self) -> &TypeSystem;
fn scripts(&self) -> impl Iterator<Item = &Lib>;
fn genesis(&self) -> &Genesis;
fn bundles_info(
&self,
) -> impl Iterator<Item = (&TransitionBundle, &Anchor<DbcProof>, Txid)>;
// Provided method
fn bundle_ids<'iter>(&self) -> impl Iterator<Item = BundleId> + 'iter { ... }
}Expand description
Trait defining common data access API for all storage-related RGB structures
The API provided for the consignment should not verify the internal
consistency, schema conformance or validation status of the RGB contract
data within the storage or container. If the methods are called on an
invalid or absent data, the API must always return None or empty
collections/iterators.
Required Methods§
Sourcefn types(&self) -> &TypeSystem
fn types(&self) -> &TypeSystem
Returns reference to the type system.
Sourcefn scripts(&self) -> impl Iterator<Item = &Lib>
fn scripts(&self) -> impl Iterator<Item = &Lib>
Returns reference to a collection of AluVM libraries used for the validation.
Sourcefn bundles_info(
&self,
) -> impl Iterator<Item = (&TransitionBundle, &Anchor<DbcProof>, Txid)>
fn bundles_info( &self, ) -> impl Iterator<Item = (&TransitionBundle, &Anchor<DbcProof>, Txid)>
Returns iterator over all bundle information in the consignment
Provided Methods§
Sourcefn bundle_ids<'iter>(&self) -> impl Iterator<Item = BundleId> + 'iter
fn bundle_ids<'iter>(&self) -> impl Iterator<Item = BundleId> + 'iter
Returns iterator over all bundle ids present in the consignment.
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.