fn custom_query<T: Serialize, U: DeserializeOwned>(
        &self,
        request: &QueryRequest<T>,
    ) -> StdResult<U> {
        let raw = match to_vec(request) {
            Ok(raw) => raw,
            Err(e) => {
                return Err(StdError::generic_err(format!(
                    "Serializing QueryRequest: {}",
                    e
                )))
            }
        };
        match self.raw_query(&raw) {
            Err(sys) => Err(StdError::generic_err(format!(
                "Querier system error: {}",
                sys
            ))),
            Ok(Err(err)) => Err(err),
            // in theory we would process the response, but here it is the same type, so just pass through
            Ok(Ok(res)) => from_binary(&res),
        }
    }
/// Makes the query and parses the response. Also handles custom queries,
/// so you need to specify the custom query type in the function parameters.
/// If you are no using a custom query, just use `query` for easier interface.
///
/// Any error (System Error, Error or called contract, or Parse Error) are flattened into
/// one level. Only use this if you don't need to check the SystemError
/// eg. If you don't differentiate between contract missing and contract returned error
Makes the query and parses the response. Also handles custom queries,
so you need to specify the custom query type in the function parameters.
If you are no using a custom query, just use `query` for easier interface.

Any error (System Error, Error or called contract, or Parse Error) are flattened into
one level. Only use this if you don't need to check the SystemError
eg. If you don't differentiate between contract missing and contract returned error
Makes the query and parses the response . Also handles custom queries so you need to specify the custom query type in the function parameters . If you are no using a custom query just use ` query ` for easier interface . Any error ( System Error Error or called contract or Parse Error ) are flattened into one level . Only use this if you don ' t need to check the SystemError eg . If you don ' t differentiate between contract missing and contract returned error
fn custom_query<T: Serialize, U: DeserializeOwned>(
        &self,
        request: &QueryRequest<T>,
    ) -> StdResult<U> {
        let raw = match to_vec(request) {
            Ok(raw) => raw,
            Err(e) => {
                return Err(StdError::generic_err(format!(
                    "Serializing QueryRequest: {}",
                    e
                )))
            }
        };
        match self.raw_query(&raw) {
            Err(sys) => Err(StdError::generic_err(format!(
                "Querier system error: {}",
                sys
            ))),
            Ok(Err(err)) => Err(err),
            // in theory we would process the response, but here it is the same type, so just pass through
            Ok(Ok(res)) => from_binary(&res),
        }
    }
fn custom_query < T : Serialize , U : DeserializeOwned > ( & self , request : & QueryRequest < T > , ) -> StdResult < U > { let raw = match to_vec ( request ) { Ok ( raw ) => raw , Err ( e ) => { return Err ( StdError :: generic_err ( format ! ( " " e ) ) ) } } ; match self . raw_query ( & raw ) { Err ( sys ) => Err ( StdError :: generic_err ( format ! ( " " sys ) ) ) , Ok ( Err ( err ) ) => Err ( err ) , // in theory we would process the response, but here it is the same type, so just pass through Ok ( Ok ( res ) ) => from_binary ( & res ) , } }
Makes the query and parses the response.
Makes the query and parses the response .
&self
request
&QueryRequest<T>
&self
request
&QueryRequest<T>