Enum cosmwasm_std::BankQuery
source · #[non_exhaustive]
pub enum BankQuery {
Supply {
denom: String,
},
Balance {
address: String,
denom: String,
},
AllBalances {
address: String,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Supply
This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK’s RPC API. Return value is of type SupplyResponse.
Balance
This calls into the native bank module for one denomination Return value is BalanceResponse
AllBalances
This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.
Trait Implementations§
source§impl<'de> Deserialize<'de> for BankQuery
impl<'de> Deserialize<'de> for BankQuery
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<C: CustomQuery> From<BankQuery> for QueryRequest<C>
impl<C: CustomQuery> From<BankQuery> for QueryRequest<C>
source§impl JsonSchema for BankQuery
impl JsonSchema for BankQuery
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read more