pub trait AsyncDexQueryMsgFns<Chain: AsyncWasmQuerier + ChainState, CwOrchQueryMsgType: Sync>: AsyncCwOrchQuery<Chain, QueryMsg = CwOrchQueryMsgType>where
DexQueryMsg: Into<CwOrchQueryMsgType>,{
// Provided methods
async fn simulate_swap_async(
&self,
ask_asset: AssetEntry,
dex: DexName,
offer_asset: AnsAsset,
) -> Result<SimulateSwapResponse, CwEnvError> { ... }
async fn simulate_swap_raw_async(
&self,
ask_asset: AssetInfoBase<String>,
dex: DexName,
offer_asset: AssetBase<String>,
pool: UncheckedPoolAddress,
) -> Result<SimulateSwapResponse<AssetInfoBase<String>>, CwEnvError> { ... }
async fn generate_messages_async(
&self,
addr_as_sender: impl Into<String>,
message: DexExecuteMsg,
) -> Result<GenerateMessagesResponse, CwEnvError> { ... }
async fn fees_async(&self) -> Result<DexFeesResponse, CwEnvError> { ... }
}Expand description
Automatically derived trait that allows you to call the variants of the message directly without the need to construct the struct yourself.
Provided Methods§
Sourceasync fn simulate_swap_async(
&self,
ask_asset: AssetEntry,
dex: DexName,
offer_asset: AnsAsset,
) -> Result<SimulateSwapResponse, CwEnvError>
async fn simulate_swap_async( &self, ask_asset: AssetEntry, dex: DexName, offer_asset: AnsAsset, ) -> Result<SimulateSwapResponse, CwEnvError>
Automatically generated wrapper around DexQueryMsg::SimulateSwap variant
Sourceasync fn simulate_swap_raw_async(
&self,
ask_asset: AssetInfoBase<String>,
dex: DexName,
offer_asset: AssetBase<String>,
pool: UncheckedPoolAddress,
) -> Result<SimulateSwapResponse<AssetInfoBase<String>>, CwEnvError>
async fn simulate_swap_raw_async( &self, ask_asset: AssetInfoBase<String>, dex: DexName, offer_asset: AssetBase<String>, pool: UncheckedPoolAddress, ) -> Result<SimulateSwapResponse<AssetInfoBase<String>>, CwEnvError>
Automatically generated wrapper around DexQueryMsg::SimulateSwapRaw variant
Sourceasync fn generate_messages_async(
&self,
addr_as_sender: impl Into<String>,
message: DexExecuteMsg,
) -> Result<GenerateMessagesResponse, CwEnvError>
async fn generate_messages_async( &self, addr_as_sender: impl Into<String>, message: DexExecuteMsg, ) -> Result<GenerateMessagesResponse, CwEnvError>
Automatically generated wrapper around DexQueryMsg::GenerateMessages variant
Sourceasync fn fees_async(&self) -> Result<DexFeesResponse, CwEnvError>
async fn fees_async(&self) -> Result<DexFeesResponse, CwEnvError>
Automatically generated wrapper around DexQueryMsg::Fees variant
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.