Struct oasis_contract_sdk::testing::MockContext[][src]

pub struct MockContext {
    pub ec: ExecutionContext,
    pub public_store: MockStore,
    pub confidential_store: MockStore,
    pub env: MockEnv,
    pub messages: Vec<Message>,
    pub events: Vec<RawEvent>,
}
Expand description

A mock contract context suitable for testing.

Fields

ec: ExecutionContext

Execution context.

public_store: MockStore

Public store.

confidential_store: MockStore

“Confidential” store.

env: MockEnv

Environment.

messages: Vec<Message>

Emitted messages.

events: Vec<RawEvent>

Emitted events.

Trait Implementations

The public store.

The confidential store.

The environment.

Contract instance identifier.

Contract instance address.

Caller address.

Tokens deposited by the caller.

Whether the call is read-only and must not make any storage modifications.

Call format.

Emits a message.

Emits an event.

Public contract store.

Confidential contract store.

Environment.

Performs the conversion.

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.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.