Trait xcm_builder::test_utils::OnResponse
source · pub trait OnResponse {
fn expecting_response(origin: &MultiLocation, query_id: u64) -> bool;
fn on_response(
origin: &MultiLocation,
query_id: u64,
response: Response,
max_weight: u64
) -> u64;
}
Expand description
Define what needs to be done upon receiving a query response.
Required Methods§
sourcefn expecting_response(origin: &MultiLocation, query_id: u64) -> bool
fn expecting_response(origin: &MultiLocation, query_id: u64) -> bool
Returns true
if we are expecting a response from origin
for query query_id
.
sourcefn on_response(
origin: &MultiLocation,
query_id: u64,
response: Response,
max_weight: u64
) -> u64
fn on_response(
origin: &MultiLocation,
query_id: u64,
response: Response,
max_weight: u64
) -> u64
Handler for receiving a response
from origin
relating to query_id
.