[−][src]Struct cosmwasm_std::Extern
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: S
api: A
querier: Q
Implementations
impl<S: Storage, A: Api, Q: Querier> Extern<S, A, Q>
[src]
pub fn change_querier<T: Querier, F: Fn(Q) -> T>(
self,
transform: F
) -> Extern<S, A, T>
[src]
self,
transform: F
) -> Extern<S, A, T>
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.
Auto Trait Implementations
impl<S, A, Q> RefUnwindSafe for Extern<S, A, Q> where
A: RefUnwindSafe,
Q: RefUnwindSafe,
S: RefUnwindSafe,
A: RefUnwindSafe,
Q: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, A, Q> Send for Extern<S, A, Q> where
Q: Send,
S: Send,
Q: Send,
S: Send,
impl<S, A, Q> Sync for Extern<S, A, Q> where
A: Sync,
Q: Sync,
S: Sync,
A: Sync,
Q: Sync,
S: Sync,
impl<S, A, Q> Unpin for Extern<S, A, Q> where
A: Unpin,
Q: Unpin,
S: Unpin,
A: Unpin,
Q: Unpin,
S: Unpin,
impl<S, A, Q> UnwindSafe for Extern<S, A, Q> where
A: UnwindSafe,
Q: UnwindSafe,
S: UnwindSafe,
A: UnwindSafe,
Q: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,