Expand description
The crate fuel-core-storage
contains storage types, primitives, tables used by fuel-core
.
This crate doesn’t contain the actual implementation of the storage. It works around the
Database
and is used by services to provide a default implementation. Primitives
defined here are used by services but are flexible enough to customize the
logic when the Database
is known.
Modules§
- blueprint
- The module defines structures for the
Mappable
tables. Each table may have its blueprint that defines how it works with the storage. The table may have a plain blueprint that simply works in CRUD mode, or it may be an SMT-based blueprint that maintains a valid Merkle tree over the storage entries. - codec
- The module contains the traits for encoding and decoding the types(a.k.a Codec). It implements common codecs and encoders, but it is always possible to define own codecs.
- column
- The module defines the
Column
and default tables used by the currentfuel-core
codebase. In the future, theColumn
enum should contain only the required tables for the execution. All other tables should live in the downstream creates in the place where they are really used. - iter
- The module defines primitives that allow iterating of the storage.
- kv_
store - The module provides plain abstract definition of the key-value store.
- structured_
storage - The module contains the
StructuredStorage
wrapper around the key-value storage that implements the storage traits for the tables with blueprint. - tables
- The module contains definition of storage tables used by default implementation of fuel services.
- transactional
- The primitives to work with storage in transactional mode.
- vm_
storage - The wrapper around the storage for VM implements non-storage getters.
Macros§
- not_
found - Creates
StorageError::NotFound
error with file and line information inside.
Structs§
- Contracts
Asset Key - The FuelVM storage double key.
- Contracts
State Data - Storage type for contract state
- Contracts
State Key - The FuelVM storage double key.
- Storage
Mut - The wrapper around the storage that supports methods from
StorageInspect
andStorageMutate
. - Storage
Ref - The wrapper around the storage that supports only methods from
StorageInspect
.
Enums§
- Error
- Error occurring during interaction with storage
Traits§
- Contracts
Assets Storage - Storage operations for contract assets.
- Interpreter
Storage - When this trait is implemented, the underlying interpreter is guaranteed to have full functionality
- IsNot
Found - The helper trait to work with storage errors.
- Mappable
- Mappable type with
Key
andValue
. - Merkle
Root Storage - Returns the merkle root for the
StorageType
per merkleKey
. Per one storage, it is possible to have several merkle trees under differentKey
. - Predicate
Storage Requirements - Storage requirements for predicates.
- Storage
AsMut - Helper trait for
StorageMutate
to provide user-friendly API to retrieve storage as mutable reference. - Storage
AsRef - Helper trait for
StorageInspect
to provide user-friendly API to retrieve storage as reference. - Storage
Batch Mutate - The traits allow work with the storage in batches. Some implementations can perform batch operations faster than one by one.
- Storage
Inspect - Base read storage trait for Fuel infrastructure.
- Storage
Mutate - Base storage trait for Fuel infrastructure.
- Storage
Read - Base storage trait for Fuel infrastructure.
- Storage
Size - Base storage trait for Fuel infrastructure.
- Storage
Write - Base storage trait for Fuel infrastructure.
Type Aliases§
- Merkle
Root - Merkle root alias type
- Result
- The storage result alias.