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.

Implementations on Foreign Types§

source§

impl AsLocalKey for DefId

source§

impl AsLocalKey for ModDefId

source§

impl AsLocalKey for CrateNum

source§

impl AsLocalKey for (CrateNum, SimplifiedType)

source§

impl AsLocalKey for (CrateNum, DefId)

Implementors§

source§

impl<'tcx> AsLocalKey for InstanceDef<'tcx>

§

type LocalKey = InstanceDef<'tcx>