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
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. - 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
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. - iter
- The module defines primitives that allow iterating of the storage.
- kv_
store - The module provides plain abstract definition of the key-value store.
- merkle
- This module provides helpers to work with merkle trees You just need to provide a set of columns and the rest of the merkle* traits will be implemented for you.
- structured_
storage - The module contains the
StructuredStoragewrapper 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::NotFounderror 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
StorageInspectandStorageMutate. - 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
KeyandValue. - Merkle
Root Storage - Returns the merkle root for the
StorageTypeper 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
StorageMutateto provide user-friendly API to retrieve storage as mutable reference. - Storage
AsRef - Helper trait for
StorageInspectto 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.