Struct cfx_storage::tests::FakeDbForStateTest
source · pub struct FakeDbForStateTest {}
Trait Implementations§
source§impl Default for FakeDbForStateTest
impl Default for FakeDbForStateTest
source§fn default() -> FakeDbForStateTest
fn default() -> FakeDbForStateTest
Returns the “default value” for a type. Read more
source§impl KeyValueDB for FakeDbForStateTest
impl KeyValueDB for FakeDbForStateTest
source§fn write_buffered(&self, _transaction: DBTransaction)
fn write_buffered(&self, _transaction: DBTransaction)
No-op
source§fn get_by_prefix(&self, _col: u32, _prefix: &[u8]) -> Option<Box<[u8]>>
fn get_by_prefix(&self, _col: u32, _prefix: &[u8]) -> Option<Box<[u8]>>
Get a value by partial key. Only works for flushed data.
source§fn iter<'a>(
&'a self,
_col: u32
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)>>
fn iter<'a>( &'a self, _col: u32 ) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)>>
Iterate over flushed data for a given column.
source§fn iter_from_prefix<'a>(
&'a self,
_col: u32,
_prefix: &'a [u8]
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)>>
fn iter_from_prefix<'a>( &'a self, _col: u32, _prefix: &'a [u8] ) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)>>
Iterate over flushed data for a given column, starting from a given prefix.
source§fn restore(&self, _new_db: &str) -> Result<()>
fn restore(&self, _new_db: &str) -> Result<()>
Attempt to replace this database with a new one located at the given path.
§fn transaction(&self) -> DBTransaction
fn transaction(&self) -> DBTransaction
Helper to create a new transaction.
Auto Trait Implementations§
impl RefUnwindSafe for FakeDbForStateTest
impl Send for FakeDbForStateTest
impl Sync for FakeDbForStateTest
impl Unpin for FakeDbForStateTest
impl UnwindSafe for FakeDbForStateTest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> ElementSatisfy<ElementNoConstrain> for T
impl<T> ElementSatisfy<ElementNoConstrain> for T
fn to_constrain_object(&self) -> &ElementNoConstrain
fn to_constrain_object_mut(&mut self) -> &mut ElementNoConstrain
§impl<T> MallocSizeOfExt for Twhere
T: MallocSizeOf,
impl<T> MallocSizeOfExt for Twhere
T: MallocSizeOf,
§fn malloc_size_of(&self) -> usize
fn malloc_size_of(&self) -> usize
Method to launch a heapsize measurement with a
fresh state.