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