pub struct MockApi { /* private fields */ }

Trait Implementations§

source§

impl Api for MockApi

source§

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
source§

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 representation is needed. Read more
source§

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.
source§

fn secp256k1_verify(
    &self,
    message_hash: &[u8],
    signature: &[u8],
    public_key: &[u8]
) -> Result<bool, VerificationError>

source§

fn secp256k1_recover_pubkey(
    &self,
    message_hash: &[u8],
    signature: &[u8],
    recovery_param: u8
) -> Result<Vec<u8>, RecoverPubkeyError>

source§

fn ed25519_verify(
    &self,
    message: &[u8],
    signature: &[u8],
    public_key: &[u8]
) -> Result<bool, VerificationError>

source§

fn ed25519_batch_verify(
    &self,
    messages: &[&[u8]],
    signatures: &[&[u8]],
    public_keys: &[&[u8]]
) -> Result<bool, VerificationError>

source§

fn debug(&self, message: &str)

Emits a debugging message that is handled depending on the environment (typically printed to console or ignored). Those messages are not persisted to chain.
source§

impl Clone for MockApi

source§

fn clone(&self) -> MockApi

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for MockApi

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Copy for MockApi

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for Twhere
    T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere
    T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.