pub trait OnResponse {
    // Required methods
    fn expecting_response(
        origin: &MultiLocation,
        query_id: u64,
        querier: Option<&MultiLocation>
    ) -> bool;
    fn on_response(
        origin: &MultiLocation,
        query_id: u64,
        querier: Option<&MultiLocation>,
        response: Response,
        max_weight: Weight,
        context: &XcmContext
    ) -> Weight;
}
Expand description

Define what needs to be done upon receiving a query response.

Required Methods§

source

fn expecting_response( origin: &MultiLocation, query_id: u64, querier: Option<&MultiLocation> ) -> bool

Returns true if we are expecting a response from origin for query query_id that was queried by querier.

source

fn on_response( origin: &MultiLocation, query_id: u64, querier: Option<&MultiLocation>, response: Response, max_weight: Weight, context: &XcmContext ) -> Weight

Handler for receiving a response from origin relating to query_id initiated by querier.

Implementations on Foreign Types§

source§

impl OnResponse for ()

source§

fn expecting_response( _origin: &MultiLocation, _query_id: u64, _querier: Option<&MultiLocation> ) -> bool

source§

fn on_response( _origin: &MultiLocation, _query_id: u64, _querier: Option<&MultiLocation>, _response: Response, _max_weight: Weight, _context: &XcmContext ) -> Weight

Implementors§