Struct clone_cw_multi_test::ContractWrapper
source · pub struct ContractWrapper<T1, T2, T3, E1, E2, E3, C = Empty, Q = Empty, T4 = Empty, E4 = StdError, E5 = StdError, T6 = Empty, E6 = StdError>where
T1: DeserializeOwned + Debug,
T2: DeserializeOwned,
T3: DeserializeOwned,
T4: DeserializeOwned,
T6: DeserializeOwned,
E1: Display + Debug + Send + Sync + 'static,
E2: Display + Debug + Send + Sync + 'static,
E3: Display + Debug + Send + Sync + 'static,
E4: Display + Debug + Send + Sync + 'static,
E5: Display + Debug + Send + Sync + 'static,
E6: Display + Debug + Send + Sync + 'static,
C: Clone + Debug + PartialEq + JsonSchema,
Q: CustomQuery + DeserializeOwned + 'static,{
pub query_fn: fn(_: Deps<'_, Q>, _: Env, _: T3) -> Result<Binary, E3>,
/* private fields */
}Expand description
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
Fields§
§query_fn: fn(_: Deps<'_, Q>, _: Env, _: T3) -> Result<Binary, E3>Implementations§
source§impl<T1, T2, T3, E1, E2, E3, C, Q> ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q>where
T1: DeserializeOwned + Debug + 'static,
T2: DeserializeOwned + 'static,
T3: DeserializeOwned + 'static,
E1: Display + Debug + Send + Sync + 'static,
E2: Display + Debug + Send + Sync + 'static,
E3: Display + Debug + Send + Sync + 'static,
C: Clone + Debug + PartialEq + JsonSchema + 'static,
Q: CustomQuery + DeserializeOwned + 'static,
impl<T1, T2, T3, E1, E2, E3, C, Q> ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q>where
T1: DeserializeOwned + Debug + 'static,
T2: DeserializeOwned + 'static,
T3: DeserializeOwned + 'static,
E1: Display + Debug + Send + Sync + 'static,
E2: Display + Debug + Send + Sync + 'static,
E3: Display + Debug + Send + Sync + 'static,
C: Clone + Debug + PartialEq + JsonSchema + 'static,
Q: CustomQuery + DeserializeOwned + 'static,
pub fn new( execute_fn: fn(deps: DepsMut<'_, Q>, env: Env, info: MessageInfo, msg: T1) -> Result<Response<C>, E1>, instantiate_fn: fn(deps: DepsMut<'_, Q>, env: Env, info: MessageInfo, msg: T2) -> Result<Response<C>, E2>, query_fn: fn(deps: Deps<'_, Q>, env: Env, msg: T3) -> Result<Binary, E3>, ) -> Self
source§impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>where
T1: DeserializeOwned + Debug + 'static,
T2: DeserializeOwned + 'static,
T3: DeserializeOwned + 'static,
T4: DeserializeOwned + 'static,
T6: DeserializeOwned + 'static,
E1: Display + Debug + Send + Sync + 'static,
E2: Display + Debug + Send + Sync + 'static,
E3: Display + Debug + Send + Sync + 'static,
E4: Display + Debug + Send + Sync + 'static,
E5: Display + Debug + Send + Sync + 'static,
E6: Display + Debug + Send + Sync + 'static,
C: Clone + Debug + PartialEq + JsonSchema + 'static,
Q: CustomQuery + DeserializeOwned + 'static,
impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>where
T1: DeserializeOwned + Debug + 'static,
T2: DeserializeOwned + 'static,
T3: DeserializeOwned + 'static,
T4: DeserializeOwned + 'static,
T6: DeserializeOwned + 'static,
E1: Display + Debug + Send + Sync + 'static,
E2: Display + Debug + Send + Sync + 'static,
E3: Display + Debug + Send + Sync + 'static,
E4: Display + Debug + Send + Sync + 'static,
E5: Display + Debug + Send + Sync + 'static,
E6: Display + Debug + Send + Sync + 'static,
C: Clone + Debug + PartialEq + JsonSchema + 'static,
Q: CustomQuery + DeserializeOwned + 'static,
pub fn with_sudo<T4A, E4A>( self, sudo_fn: fn(deps: DepsMut<'_, Q>, env: Env, msg: T4A) -> Result<Response<C>, E4A>, ) -> ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4A, E4A, E5, T6, E6>
pub fn with_reply<E5A>( self, reply_fn: fn(deps: DepsMut<'_, Q>, env: Env, msg: Reply) -> Result<Response<C>, E5A>, ) -> ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5A, T6, E6>
pub fn with_migrate<T6A, E6A>( self, migrate_fn: fn(deps: DepsMut<'_, Q>, env: Env, msg: T6A) -> Result<Response<C>, E6A>, ) -> ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6A, E6A>
Trait Implementations§
source§impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> Clone for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>where
T1: DeserializeOwned + Debug + Clone,
T2: DeserializeOwned + Clone,
T3: DeserializeOwned + Clone,
T4: DeserializeOwned + Clone,
T6: DeserializeOwned + Clone,
E1: Display + Debug + Send + Sync + 'static + Clone,
E2: Display + Debug + Send + Sync + 'static + Clone,
E3: Display + Debug + Send + Sync + 'static + Clone,
E4: Display + Debug + Send + Sync + 'static + Clone,
E5: Display + Debug + Send + Sync + 'static + Clone,
E6: Display + Debug + Send + Sync + 'static + Clone,
C: Clone + Debug + PartialEq + JsonSchema + Clone,
Q: CustomQuery + DeserializeOwned + 'static + Clone,
impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> Clone for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>where
T1: DeserializeOwned + Debug + Clone,
T2: DeserializeOwned + Clone,
T3: DeserializeOwned + Clone,
T4: DeserializeOwned + Clone,
T6: DeserializeOwned + Clone,
E1: Display + Debug + Send + Sync + 'static + Clone,
E2: Display + Debug + Send + Sync + 'static + Clone,
E3: Display + Debug + Send + Sync + 'static + Clone,
E4: Display + Debug + Send + Sync + 'static + Clone,
E5: Display + Debug + Send + Sync + 'static + Clone,
E6: Display + Debug + Send + Sync + 'static + Clone,
C: Clone + Debug + PartialEq + JsonSchema + Clone,
Q: CustomQuery + DeserializeOwned + 'static + Clone,
source§fn clone(
&self,
) -> ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>
fn clone( &self, ) -> ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T1, T2, T3, E1, E2, E3, C, T4, E4, E5, T6, E6, Q> Contract<C, Q> for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>where
T1: DeserializeOwned + Debug + Clone,
T2: DeserializeOwned + Debug + Clone,
T3: DeserializeOwned + Debug + Clone,
T4: DeserializeOwned,
T6: DeserializeOwned,
E1: Display + Debug + Send + Sync + Error + 'static,
E2: Display + Debug + Send + Sync + Error + 'static,
E3: Display + Debug + Send + Sync + Error + 'static,
E4: Display + Debug + Send + Sync + 'static,
E5: Display + Debug + Send + Sync + 'static,
E6: Display + Debug + Send + Sync + 'static,
C: CustomMsg + DeserializeOwned + Clone + Debug + PartialEq + JsonSchema,
Q: CustomQuery + DeserializeOwned,
impl<T1, T2, T3, E1, E2, E3, C, T4, E4, E5, T6, E6, Q> Contract<C, Q> for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>where
T1: DeserializeOwned + Debug + Clone,
T2: DeserializeOwned + Debug + Clone,
T3: DeserializeOwned + Debug + Clone,
T4: DeserializeOwned,
T6: DeserializeOwned,
E1: Display + Debug + Send + Sync + Error + 'static,
E2: Display + Debug + Send + Sync + Error + 'static,
E3: Display + Debug + Send + Sync + Error + 'static,
E4: Display + Debug + Send + Sync + 'static,
E5: Display + Debug + Send + Sync + 'static,
E6: Display + Debug + Send + Sync + 'static,
C: CustomMsg + DeserializeOwned + Clone + Debug + PartialEq + JsonSchema,
Q: CustomQuery + DeserializeOwned,
fn execute( &self, deps: DepsMut<'_, Q>, env: Env, info: MessageInfo, msg: Vec<u8>, fork_state: ForkState<C, Q>, ) -> AnyResult<Response<C>>
fn instantiate( &self, deps: DepsMut<'_, Q>, env: Env, info: MessageInfo, msg: Vec<u8>, fork_state: ForkState<C, Q>, ) -> AnyResult<Response<C>>
fn query( &self, deps: Deps<'_, Q>, env: Env, msg: Vec<u8>, fork_state: ForkState<C, Q>, ) -> AnyResult<Binary>
fn sudo( &self, deps: DepsMut<'_, Q>, env: Env, msg: Vec<u8>, fork_state: ForkState<C, Q>, ) -> AnyResult<Response<C>>
fn reply( &self, deps: DepsMut<'_, Q>, env: Env, reply_data: Reply, fork_state: ForkState<C, Q>, ) -> AnyResult<Response<C>>
fn migrate( &self, deps: DepsMut<'_, Q>, env: Env, msg: Vec<u8>, fork_state: ForkState<C, Q>, ) -> AnyResult<Response<C>>
impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> Copy for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>where
T1: DeserializeOwned + Debug + Copy,
T2: DeserializeOwned + Copy,
T3: DeserializeOwned + Copy,
T4: DeserializeOwned + Copy,
T6: DeserializeOwned + Copy,
E1: Display + Debug + Send + Sync + 'static + Copy,
E2: Display + Debug + Send + Sync + 'static + Copy,
E3: Display + Debug + Send + Sync + 'static + Copy,
E4: Display + Debug + Send + Sync + 'static + Copy,
E5: Display + Debug + Send + Sync + 'static + Copy,
E6: Display + Debug + Send + Sync + 'static + Copy,
C: Clone + Debug + PartialEq + JsonSchema + Copy,
Q: CustomQuery + DeserializeOwned + 'static + Copy,
Auto Trait Implementations§
impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> Freeze for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>
impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> RefUnwindSafe for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>
impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> Send for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>
impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> Sync for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>
impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> Unpin for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>
impl<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6> UnwindSafe for ContractWrapper<T1, T2, T3, E1, E2, E3, C, Q, T4, E4, E5, T6, E6>
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Requestsource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref