pub fn do_query<T: DeserializeOwned + JsonSchema>(
    query_fn: &dyn Fn(
        &Extern<ExternalStorage, ExternalApi, ExternalQuerier>,
        T,
    ) -> StdResult<QueryResponse>,
    msg_ptr: u32,
) -> u32 {
    let res: QueryResult = _do_query(query_fn, msg_ptr as *mut Region);
    let v = to_vec(&res).unwrap();
    release_buffer(v) as u32
}
/// do_query should be wrapped in an external "C" export, containing a contract-specific function as arg
do_query should be wrapped in an external "C" export, containing a contract-specific function as arg
do_query should be wrapped in an external " C " export containing a contract - specific function as arg
pub fn do_query<T: DeserializeOwned + JsonSchema>(
    query_fn: &dyn Fn(
        &Extern<ExternalStorage, ExternalApi, ExternalQuerier>,
        T,
    ) -> StdResult<QueryResponse>,
    msg_ptr: u32,
) -> u32 {
    let res: QueryResult = _do_query(query_fn, msg_ptr as *mut Region);
    let v = to_vec(&res).unwrap();
    release_buffer(v) as u32
}
pub fn do_query < T : DeserializeOwned + JsonSchema > ( query_fn : & dyn Fn ( & Extern < ExternalStorage , ExternalApi , ExternalQuerier > , T , ) -> StdResult < QueryResponse > , msg_ptr : u32 , ) -> u32 { let res : QueryResult = _do_query ( query_fn , msg_ptr as * mut Region ) ; let v = to_vec ( & res ) . unwrap ( ) ; release_buffer ( v ) as u32 }
do_query should be wrapped in an external "C" export, containing a contract-specific function as arg
do_query should be wrapped in an external " C " export containing a contract - specific function as arg
query_fn
&dyn Fn(
        &Extern<ExternalStorage, ExternalApi, ExternalQuerier>,
        T,
    ) -> StdResult<QueryResponse>
msg_ptr
u32
query_fn
&dyn Fn(
        &Extern<ExternalStorage, ExternalApi, ExternalQuerier>,
        T,
    ) -> StdResult<QueryResponse>
msg_ptr
u32