Struct ic_kit::Watcher [−][src]
pub struct Watcher {
pub called_id: bool,
pub called_time: bool,
pub called_balance: bool,
pub called_caller: bool,
pub called_msg_cycles_available: bool,
pub called_msg_cycles_accept: bool,
pub called_msg_cycles_refunded: bool,
pub called_stable_store: bool,
pub called_stable_restore: bool,
pub called_set_certified_data: bool,
pub called_data_certificate: bool,
// some fields omitted
}Expand description
A watcher can be used to inspect the calls made in a call.
Fields
called_id: boolTrue if the context.id() was called during execution.
called_time: boolTrue if the context.time() was called during execution.
called_balance: boolTrue if the context.balance() was called during execution.
called_caller: boolTrue if the context.caller() was called during execution.
called_msg_cycles_available: boolTrue if the context.msg_cycles_available() was called during execution.
called_msg_cycles_accept: boolTrue if the context.msg_cycles_accept() was called during execution.
called_msg_cycles_refunded: boolTrue if the context.msg_cycles_refunded() was called during execution.
called_stable_store: boolTrue if the context.stable_store() was called during execution.
called_stable_restore: boolTrue if the context.stable_restore() was called during execution.
called_set_certified_data: boolTrue if the context.set_certified_data() was called during execution.
called_data_certificate: boolTrue if the context.data_certificate() was called during execution.
Implementations
Push a call to the call history of the watcher.
Return the number of calls made during the last execution.
Returns the total amount of cycles consumed in inter-canister calls.
Returns the total amount of cycles refunded in inter-canister calls.
Returns the total amount of cycles sent in inter-canister calls, not deducing the refunded amounts.
Return the n-th call that took place during the execution.
Returns true if the given method was called during the execution.
Returns true if the given canister was called during the execution.
Returns true if the given method was called.
Returns true if the given storage item was accessed in a mutable way during the execution. This method tracks calls to:
- context.store()
- context.get_mut()
- context.delete()