pub trait ResponseHandler{
type QueryResponse;
type Response;
type Method: RpcMethod;
// Required method
fn process_response(
&self,
responses: Vec<Self::QueryResponse>,
) -> Result<Self::Response, QueryError<Self::Method>>;
// Provided method
fn request_amount(&self) -> usize { ... }
}
Required Associated Types§
Required Methods§
Sourcefn process_response(
&self,
responses: Vec<Self::QueryResponse>,
) -> Result<Self::Response, QueryError<Self::Method>>
fn process_response( &self, responses: Vec<Self::QueryResponse>, ) -> Result<Self::Response, QueryError<Self::Method>>
NOTE: responses should always >= 1