rustc_middle::query::keys

Trait AsLocalKey

Source
pub trait AsLocalKey: Key {
    type LocalKey;

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

Required Associated Types§

Required Methods§

Source

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

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

Source§

impl AsLocalKey for (CrateNum, SimplifiedType)

Source§

type LocalKey = SimplifiedType<DefId>

Source§

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

Source§

impl AsLocalKey for CrateNum

Source§

impl AsLocalKey for DefId

Source§

impl AsLocalKey for ModDefId

Implementors§