pub struct Extern<S, A, Q> where
    S: Storage,
    A: Api,
    Q: Querier
{ pub storage: S, pub api: A, pub querier: Q, }
Expand description

Holds all external dependencies of the contract. Designed to allow easy dependency injection at runtime. This cannot be copied or cloned since it would behave differently for mock storages and a bridge storage in the VM.

Fields

storage: Sapi: Aquerier: Q

Implementations

change_querier is a helper mainly for test code when swapping out the Querier from the auto-generated one from mock_dependencies. This changes the type of Extern so replaces requires some boilerplate.

Trait Implementations

Uses a single slice as namespace and it combines it with the key

Uses an array of slices which are then combined according to the following spec: https://github.com/webmaster128/key-namespacing#nesting 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.