referrerpolicy=no-referrer-when-downgrade
staging_xcm_builder

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

type WeightInfo = ()

Source§

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

Implementors§

impl<T: Config> QueryController<<T as Config>::RuntimeOrigin, <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>