rustc_middle::query::plumbing::sealed

Trait IntoQueryParam

Source
pub trait IntoQueryParam<P> {
    // Required method
    fn into_query_param(self) -> P;
}
Expand description

An analogue of the Into trait that’s intended only for query parameters.

This exists to allow queries to accept either DefId or LocalDefId while requiring that the user call to_def_id to convert between them everywhere else.

Required Methods§

Implementations on Foreign Types§

Source§

impl IntoQueryParam<DefId> for OwnerId

Source§

impl IntoQueryParam<DefId> for LocalDefId

Source§

impl IntoQueryParam<DefId> for LocalModDefId

Source§

impl IntoQueryParam<DefId> for ModDefId

Source§

impl IntoQueryParam<LocalDefId> for OwnerId

Source§

impl IntoQueryParam<LocalDefId> for LocalModDefId

Source§

impl<'a, P: Copy> IntoQueryParam<P> for &'a P

Implementors§

Source§

impl<P> IntoQueryParam<P> for P