pub trait HashedStorageCursor: HashedCursor {
// Required methods
fn is_storage_empty(&mut self) -> Result<bool, DatabaseError>;
fn set_hashed_address(&mut self, hashed_address: B256);
}Expand description
The cursor for iterating over hashed storage entries.
Required Methods§
Sourcefn is_storage_empty(&mut self) -> Result<bool, DatabaseError>
fn is_storage_empty(&mut self) -> Result<bool, DatabaseError>
Returns true if the current hashed address has no storage entries.
May be called immediately after Self::set_hashed_address, without first seeking.
This may change the cursor position; seek before iterating entries afterward.
Sourcefn set_hashed_address(&mut self, hashed_address: B256)
fn set_hashed_address(&mut self, hashed_address: B256)
Set the hashed address for the storage cursor.
Call HashedCursor::seek before iterating entries with HashedCursor::next.
Self::is_storage_empty may be called before seeking.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<'a, T: 'a + HashedStorageCursor + ?Sized> HashedStorageCursor for &'a mut Twhere
&'a mut T: HashedCursor,
impl<'a, T: 'a + HashedStorageCursor + ?Sized> HashedStorageCursor for &'a mut Twhere
&'a mut T: HashedCursor,
fn is_storage_empty(&mut self) -> Result<bool, DatabaseError>
fn set_hashed_address(&mut self, hashed_address: B256)
Implementors§
impl HashedStorageCursor for NoopHashedCursor<U256>
impl<C> HashedStorageCursor for HashedPostStateCursor<'_, C, U256>where
C: HashedStorageCursor<Value = U256>,
The cursor to iterate over post state hashed values and corresponding database entries. It will always give precedence to the data from the post state.
impl<C> HashedStorageCursor for InstrumentedHashedCursor<C>where
C: HashedStorageCursor,
Available on crate feature
metrics only.impl<T: Debug + Clone> HashedStorageCursor for MockHashedCursor<T>
Available on crate features
test-utils only.