Struct cosmwasm_std::testing::MockApi
source · [−]pub struct MockApi { /* private fields */ }
Trait Implementations
sourceimpl Api for MockApi
impl Api for MockApi
sourcefn addr_validate(&self, input: &str) -> StdResult<Addr>
fn addr_validate(&self, input: &str) -> StdResult<Addr>
Takes a human readable address and validates if it is valid.
If it the validation succeeds, a Addr
containing the same data as the input is returned. Read more
sourcefn addr_canonicalize(&self, input: &str) -> StdResult<CanonicalAddr>
fn addr_canonicalize(&self, input: &str) -> StdResult<CanonicalAddr>
Takes a human readable address and returns a canonical binary representation of it. This can be used when a compact fixed length representation is needed. Read more
sourcefn addr_humanize(&self, canonical: &CanonicalAddr) -> StdResult<Addr>
fn addr_humanize(&self, canonical: &CanonicalAddr) -> StdResult<Addr>
Takes a canonical address and returns a human readble address.
This is the inverse of addr_canonicalize
. Read more
fn secp256k1_verify(
&self,
message_hash: &[u8],
signature: &[u8],
public_key: &[u8]
) -> Result<bool, VerificationError>
fn secp256k1_recover_pubkey(
&self,
message_hash: &[u8],
signature: &[u8],
recovery_param: u8
) -> Result<Vec<u8>, RecoverPubkeyError>
fn ed25519_verify(
&self,
message: &[u8],
signature: &[u8],
public_key: &[u8]
) -> Result<bool, VerificationError>
fn ed25519_batch_verify(
&self,
messages: &[&[u8]],
signatures: &[&[u8]],
public_keys: &[&[u8]]
) -> Result<bool, VerificationError>
impl Copy for MockApi
Auto Trait Implementations
impl RefUnwindSafe for MockApi
impl Send for MockApi
impl Sync for MockApi
impl Unpin for MockApi
impl UnwindSafe for MockApi
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