pub struct OwnedDeps<S: Storage, A: Api, Q: Querier, C: CustomQuery = Empty> {
pub storage: S,
pub api: A,
pub querier: Q,
pub custom_query_type: PhantomData<C>,
}
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: S
§api: A
§querier: Q
§custom_query_type: PhantomData<C>
Implementations§
Auto Trait Implementations§
impl<S, A, Q, C> Freeze for OwnedDeps<S, A, Q, C>
impl<S, A, Q, C> RefUnwindSafe for OwnedDeps<S, A, Q, C>
impl<S, A, Q, C> Send for OwnedDeps<S, A, Q, C>
impl<S, A, Q, C> Sync for OwnedDeps<S, A, Q, C>
impl<S, A, Q, C> Unpin for OwnedDeps<S, A, Q, C>
impl<S, A, Q, C> UnwindSafe for OwnedDeps<S, A, Q, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more