Trait staging_xcm_builder::QueryController
source · pub trait QueryController<Origin, Timeout>: QueryHandler {
type WeightInfo: QueryControllerWeightInfo;
// Required method
fn query(
origin: Origin,
timeout: Timeout,
match_querier: VersionedLocation,
) -> Result<QueryId, DispatchError>;
}
Expand description
Query a remote location, from a given origin.
An implementation of that trait will handle the low-level details of querying a remote location, such as:
- Validating and Converting the origin to an interior location.
- Handling versioning.
- Calling the
QueryHandler
to register the query.
Required Associated Types§
sourcetype WeightInfo: QueryControllerWeightInfo
type WeightInfo: QueryControllerWeightInfo
Weight information for QueryController functions.
Required Methods§
sourcefn query(
origin: Origin,
timeout: Timeout,
match_querier: VersionedLocation,
) -> Result<QueryId, DispatchError>
fn query( origin: Origin, timeout: Timeout, match_querier: VersionedLocation, ) -> Result<QueryId, DispatchError>
Query a remote location.
§Parameters
origin
: the origin of the call, used to determine the responder.timeout
: the maximum block number that the query should be responded to.match_querier
: the querier that the query should be responded to.
Object Safety§
This trait is not object safe.