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: bool

True if the context.id() was called during execution.

called_time: bool

True if the context.time() was called during execution.

called_balance: bool

True if the context.balance() was called during execution.

called_caller: bool

True if the context.caller() was called during execution.

called_msg_cycles_available: bool

True if the context.msg_cycles_available() was called during execution.

called_msg_cycles_accept: bool

True if the context.msg_cycles_accept() was called during execution.

called_msg_cycles_refunded: bool

True if the context.msg_cycles_refunded() was called during execution.

called_stable_store: bool

True if the context.stable_store() was called during execution.

called_stable_restore: bool

True if the context.stable_restore() was called during execution.

called_set_certified_data: bool

True if the context.set_certified_data() was called during execution.

called_data_certificate: bool

True 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()

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.