Struct cw_multi_test::ContractWrapper[][src]

pub struct ContractWrapper<T1, T2, T3, E1, E2, E3, C = Empty, T4 = String, E4 = String> where
    T1: DeserializeOwned,
    T2: DeserializeOwned,
    T3: DeserializeOwned,
    T4: DeserializeOwned,
    E1: Display,
    E2: Display,
    E3: Display,
    E4: Display,
    C: Clone + Debug + PartialEq + JsonSchema
{ /* fields omitted */ }

Wraps the exported functions from a contract and provides the normalized format Place T4 and E4 at the end, as we just want default placeholders for most contracts that don’t have sudo

Implementations

impl<T1, T2, T3, E1, E2, E3, C> ContractWrapper<T1, T2, T3, E1, E2, E3, C> where
    T1: DeserializeOwned + 'static,
    T2: DeserializeOwned + 'static,
    T3: DeserializeOwned + 'static,
    E1: Display + 'static,
    E2: Display + 'static,
    E3: Display + 'static,
    C: Clone + Debug + PartialEq + JsonSchema + 'static, 
[src]

pub fn new(
    handle_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T1) -> Result<Response<C>, E1>,
    init_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T2) -> Result<Response<C>, E2>,
    query_fn: fn(deps: Deps<'_>, env: Env, msg: T3) -> Result<Binary, E3>
) -> Self
[src]

pub fn new_with_empty(
    handle_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T1) -> Result<Response<Empty>, E1>,
    init_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T2) -> Result<Response<Empty>, E2>,
    query_fn: fn(deps: Deps<'_>, env: Env, msg: T3) -> Result<Binary, E3>
) -> Self
[src]

this will take a contract that returns Response and will “upgrade” it to Response if needed to be compatible with a chain-specific extension

impl<T1, T2, T3, E1, E2, E3, C, T4, E4> ContractWrapper<T1, T2, T3, E1, E2, E3, C, T4, E4> where
    T1: DeserializeOwned + 'static,
    T2: DeserializeOwned + 'static,
    T3: DeserializeOwned + 'static,
    T4: DeserializeOwned + 'static,
    E1: Display + 'static,
    E2: Display + 'static,
    E3: Display + 'static,
    E4: Display + 'static,
    C: Clone + Debug + PartialEq + JsonSchema + 'static, 
[src]

pub fn new_with_sudo(
    handle_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T1) -> Result<Response<C>, E1>,
    init_fn: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: T2) -> Result<Response<C>, E2>,
    query_fn: fn(deps: Deps<'_>, env: Env, msg: T3) -> Result<Binary, E3>,
    sudo_fn: fn(deps: DepsMut<'_>, env: Env, msg: T4) -> Result<Response<C>, E4>
) -> Self
[src]

Trait Implementations

impl<T1, T2, T3, E1, E2, E3, C, T4, E4> Contract<C> for ContractWrapper<T1, T2, T3, E1, E2, E3, C, T4, E4> where
    T1: DeserializeOwned,
    T2: DeserializeOwned,
    T3: DeserializeOwned,
    T4: DeserializeOwned,
    E1: Display,
    E2: Display,
    E3: Display,
    E4: Display,
    C: Clone + Debug + PartialEq + JsonSchema
[src]

Auto Trait Implementations

impl<T1, T2, T3, E1, E2, E3, C = Empty, T4 = String, E4 = String> !RefUnwindSafe for ContractWrapper<T1, T2, T3, E1, E2, E3, C, T4, E4>

impl<T1, T2, T3, E1, E2, E3, C = Empty, T4 = String, E4 = String> !Send for ContractWrapper<T1, T2, T3, E1, E2, E3, C, T4, E4>

impl<T1, T2, T3, E1, E2, E3, C = Empty, T4 = String, E4 = String> !Sync for ContractWrapper<T1, T2, T3, E1, E2, E3, C, T4, E4>

impl<T1, T2, T3, E1, E2, E3, C, T4, E4> Unpin for ContractWrapper<T1, T2, T3, E1, E2, E3, C, T4, E4>

impl<T1, T2, T3, E1, E2, E3, C = Empty, T4 = String, E4 = String> !UnwindSafe for ContractWrapper<T1, T2, T3, E1, E2, E3, C, T4, E4>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.