Skip to main content

Key

Trait Key 

Source
pub(crate) trait Key {
    type KeyIndex;

    // Required methods
    fn crate_num(self) -> CrateNum;
    fn to_index(self) -> Self::KeyIndex;
    fn name(self, tcx: TyCtxt<'_>) -> String;
}
Expand description

Trait to deal with the fact that assoc_refinmenents_of and assoc_refinements_def use FluxId<K> as key;

Required Associated Types§

Required Methods§

Source

fn crate_num(self) -> CrateNum

Source

fn to_index(self) -> Self::KeyIndex

Source

fn name(self, tcx: TyCtxt<'_>) -> String

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Key for DefId

Source§

type KeyIndex = DefIndex

Source§

fn crate_num(self) -> CrateNum

Source§

fn to_index(self) -> Self::KeyIndex

Source§

fn name(self, tcx: TyCtxt<'_>) -> String

Source§

impl Key for FluxDefId

Source§

type KeyIndex = FluxId<DefIndex>

Source§

fn crate_num(self) -> CrateNum

Source§

fn to_index(self) -> Self::KeyIndex

Source§

fn name(self, tcx: TyCtxt<'_>) -> String

Implementors§