referrerpolicy=no-referrer-when-downgrade

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§

source

type WeightInfo: QueryControllerWeightInfo

Weight information for QueryController functions.

Required Methods§

source

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.

Implementations on Foreign Types§

source§

impl<Origin, Timeout> QueryController<Origin, Timeout> for ()

§

type WeightInfo = ()

source§

fn query( _origin: Origin, _timeout: Timeout, _match_querier: VersionedLocation, ) -> Result<QueryId, DispatchError>

Implementors§