pub trait CustomQuery: Serialize + Clone { }
Expand description

A trait that is required to avoid conflicts with other query types like BankQuery and WasmQuery in generic implementations. You need to implement it in your custom query type.


#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum MyCustomQuery {
    Ping {},
    Capitalized { text: String },

impl CustomQuery for MyCustomQuery {}

Object Safety§

This trait is not object safe.