Skip to main content

AsLocalQueryKey

Trait AsLocalQueryKey 

Source
pub trait AsLocalQueryKey: QueryKey {
    type LocalQueryKey;

    // Required method
    fn as_local_key(&self) -> Option<Self::LocalQueryKey>;
}

Required Associated Types§

Required Methods§

Source

fn as_local_key(&self) -> Option<Self::LocalQueryKey>

Given an instance of this key, what crate is it referring to? This is used to find the provider.

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 AsLocalQueryKey for (CrateNum, DefId)

Source§

impl AsLocalQueryKey for (CrateNum, SimplifiedType)

Source§

impl AsLocalQueryKey for CrateNum

Source§

impl AsLocalQueryKey for DefId

Implementors§