Trait ResponseHandler

Source
pub trait ResponseHandler
where <Self::Method as RpcMethod>::Error: Display + Debug,
{ 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§

Source

fn process_response( &self, responses: Vec<Self::QueryResponse>, ) -> Result<Self::Response, QueryError<Self::Method>>

NOTE: responses should always >= 1

Provided Methods§

Implementations on Foreign Types§

Source§

impl ResponseHandler for ()

Implementors§

Source§

impl ResponseHandler for AccessKeyHandler

Source§

impl ResponseHandler for AccessKeyListHandler

Source§

impl ResponseHandler for AccountViewHandler

Source§

impl ResponseHandler for RpcBlockHandler

Source§

impl ResponseHandler for RpcValidatorHandler

Source§

impl ResponseHandler for ViewCodeHandler

Source§

impl ResponseHandler for ViewStateHandler

Source§

impl<PostProcessed, Handler> ResponseHandler for PostprocessHandler<PostProcessed, Handler>
where Handler: ResponseHandler, <Handler::Method as RpcMethod>::Error: Display + Debug,

Source§

type Response = PostProcessed

Source§

type QueryResponse = <Handler as ResponseHandler>::QueryResponse

Source§

type Method = <Handler as ResponseHandler>::Method

Source§

impl<QR, Method, H1, H2, H3, R1, R2, R3> ResponseHandler for MultiQueryHandler<(H1, H2, H3)>
where Method: RpcMethod, Method::Error: Display + Debug, H1: ResponseHandler<QueryResponse = QR, Response = R1, Method = Method>, H2: ResponseHandler<QueryResponse = QR, Response = R2, Method = Method>, H3: ResponseHandler<QueryResponse = QR, Response = R3, Method = Method>,

Source§

impl<QR, Method, H1, H2, R1, R2> ResponseHandler for MultiQueryHandler<(H1, H2)>
where Method: RpcMethod, H1: ResponseHandler<QueryResponse = QR, Response = R1, Method = Method>, H2: ResponseHandler<QueryResponse = QR, Response = R2, Method = Method>, Method::Error: Display + Debug,

Source§

impl<Response> ResponseHandler for CallResultHandler<Response>
where Response: DeserializeOwned + Send + Sync,