Struct ink_engine::test_api::DebugInfo
source · pub struct DebugInfo { /* private fields */ }
Expand description
Recorder for relevant interactions with this crate.
Implementations§
source§impl DebugInfo
impl DebugInfo
pub fn new() -> Self
sourcepub fn inc_writes(&mut self, account_id: AccountId)
pub fn inc_writes(&mut self, account_id: AccountId)
Increases the number of storage writes for the supplied account by one.
sourcepub fn inc_reads(&mut self, account_id: AccountId)
pub fn inc_reads(&mut self, account_id: AccountId)
Increases the number of storage reads for the supplied account by one.
sourcepub fn record_cell_for_account(&mut self, account_id: AccountId, key: Vec<u8>)
pub fn record_cell_for_account(&mut self, account_id: AccountId, key: Vec<u8>)
Records that a cell exists for an account under key
.
Calling this function multiple times won’t change the fact that only one cell is recorded.
sourcepub fn remove_cell_for_account(
&mut self,
account_id: AccountId,
key: Vec<u8>
) -> Option<bool>
pub fn remove_cell_for_account( &mut self, account_id: AccountId, key: Vec<u8> ) -> Option<bool>
Removes the cell under key
for the supplied account.
Returns the removed cell, if there was one.
sourcepub fn record_debug_message(&mut self, message: String)
pub fn record_debug_message(&mut self, message: String)
Records a debug message.
sourcepub fn record_event(&mut self, event: EmittedEvent)
pub fn record_event(&mut self, event: EmittedEvent)
Records an event.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DebugInfo
impl Send for DebugInfo
impl Sync for DebugInfo
impl Unpin for DebugInfo
impl UnwindSafe for DebugInfo
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