Struct fadroma::composability::tester::MockExtern
source · [−]pub struct MockExtern<S: Storage, A: Api, Q: Querier> {
pub storage: S,
pub api: A,
pub querier: Q,
}
Expand description
Same as regular Extern but clonable.
Fields
storage: S
api: A
querier: Q
Implementations
sourceimpl<Q: Querier> MockExtern<ClonableMemoryStorage, MockApi, Q>
impl<Q: Querier> MockExtern<ClonableMemoryStorage, MockApi, Q>
Trait Implementations
sourceimpl<S: Storage, A: Api, Q: Querier> BaseComposable<S, A, Q> for MockExtern<S, A, Q>
impl<S: Storage, A: Api, Q: Querier> BaseComposable<S, A, Q> for MockExtern<S, A, Q>
sourceimpl<S: Clone + Storage, A: Clone + Api, Q: Clone + Querier> Clone for MockExtern<S, A, Q>
impl<S: Clone + Storage, A: Clone + Api, Q: Clone + Querier> Clone for MockExtern<S, A, Q>
sourcefn clone(&self) -> MockExtern<S, A, Q>
fn clone(&self) -> MockExtern<S, A, Q>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<S: Storage, A: Api, Q: Querier> Composable<S, A, Q> for MockExtern<S, A, Q>
impl<S: Storage, A: Api, Q: Querier> Composable<S, A, Q> for MockExtern<S, A, Q>
fn set<Value: Serialize>(&mut self, key: &[u8], value: &Value) -> UsuallyOk
sourcefn set_ns<Value: Serialize>(
&mut self,
ns: &[u8],
key: &[u8],
value: &Value
) -> UsuallyOk
fn set_ns<Value: Serialize>(
&mut self,
ns: &[u8],
key: &[u8],
value: &Value
) -> UsuallyOk
Uses a single slice as namespace and it combines it with the key
sourcefn set_multi_ns<Value: Serialize>(
&mut self,
ns: &[&[u8]],
key: &[u8],
value: &Value
) -> UsuallyOk
fn set_multi_ns<Value: Serialize>(
&mut self,
ns: &[&[u8]],
key: &[u8],
value: &Value
) -> UsuallyOk
Uses an array of slices which are then combined according to the following spec: https://github.com/webmaster128/key-namespacing#nesting Read more
fn get<Value: DeserializeOwned>(&self, key: &[u8]) -> Eventually<Value>
fn get_ns<Value: DeserializeOwned>(
&self,
ns: &[u8],
key: &[u8]
) -> Eventually<Value>
fn get_multi_ns<Value: DeserializeOwned>(
&self,
ns: &[&[u8]],
key: &[u8]
) -> Eventually<Value>
fn remove(&mut self, key: &[u8])
fn remove_ns(&mut self, ns: &[u8], key: &[u8])
fn remove_multi_ns(&mut self, ns: &[&[u8]], key: &[u8])
fn humanize<Value: Humanize>(&self, value: Value) -> StdResult<Value::Output>
fn canonize<Value: Canonize>(&self, value: Value) -> StdResult<Value::Output>
Auto Trait Implementations
impl<S, A, Q> RefUnwindSafe for MockExtern<S, A, Q> where
A: RefUnwindSafe,
Q: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, A, Q> Send for MockExtern<S, A, Q> where
Q: Send,
S: Send,
impl<S, A, Q> Sync for MockExtern<S, A, Q> where
A: Sync,
Q: Sync,
S: Sync,
impl<S, A, Q> Unpin for MockExtern<S, A, Q> where
A: Unpin,
Q: Unpin,
S: Unpin,
impl<S, A, Q> UnwindSafe for MockExtern<S, A, Q> where
A: UnwindSafe,
Q: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more