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§
- The module defines structures for the
Mappabletables. 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. - 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.
- The module defines the
Columnand default tables used by the currentfuel-corecodebase. In the future, theColumnenum 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. - The module defines primitives that allow iterating of the storage.
- The module provides plain abstract definition of the key-value store.
- The module contains the
StructuredStoragewrapper around the key-value storage that implements the storage traits for the tables with blueprint. - The module contains definition of storage tables used by default implementation of fuel services.
- The primitives to work with storage in transactional mode.
- The wrapper around the storage for VM implements non-storage getters.
Macros§
- Creates
StorageError::NotFounderror with file and line information inside.
Structs§
- The FuelVM storage double key.
- Storage type for contract state
- The FuelVM storage double key.
- The wrapper around the storage that supports methods from
StorageInspectandStorageMutate. - The wrapper around the storage that supports only methods from
StorageInspect.
Enums§
- Error occurring during interaction with storage
Traits§
- Storage operations for contract assets.
- When this trait is implemented, the underlying interpreter is guaranteed to have full functionality
- The helper trait to work with storage errors.
- Mappable type with
KeyandValue. - Returns the merkle root for the
StorageTypeper merkleKey. Per one storage, it is possible to have several merkle trees under differentKey. - Storage requirements for predicates.
- Helper trait for
StorageMutateto provide user-friendly API to retrieve storage as mutable reference. - Helper trait for
StorageInspectto provide user-friendly API to retrieve storage as reference. - The traits allow work with the storage in batches. Some implementations can perform batch operations faster than one by one.
- Base read storage trait for Fuel infrastructure.
- Base storage trait for Fuel infrastructure.
- Base storage trait for Fuel infrastructure.
- Base storage trait for Fuel infrastructure.
- Base storage trait for Fuel infrastructure.
Type Aliases§
- Merkle root alias type
- The storage result alias.