pub trait DepNodeParams<Tcx>: Debug + Sizedwhere
    Tcx: DepContext,{
    // Required methods
    fn fingerprint_style() -> FingerprintStyle;
    fn recover(tcx: Tcx, dep_node: &DepNode) -> Option<Self>;

    // Provided methods
    fn to_fingerprint(&self, _: Tcx) -> Fingerprint { ... }
    fn to_debug_str(&self, _: Tcx) -> String { ... }
}

Required Methods§

source

fn fingerprint_style() -> FingerprintStyle

source

fn recover(tcx: Tcx, dep_node: &DepNode) -> Option<Self>

This method tries to recover the query key from the given DepNode, something which is needed when forcing DepNodes during red-green evaluation. The query system will only call this method if fingerprint_style() is not FingerprintStyle::Opaque. It is always valid to return None here, in which case incremental compilation will treat the query as having changed instead of forcing it.

Provided Methods§

source

fn to_fingerprint(&self, _: Tcx) -> Fingerprint

This method turns the parameters of a DepNodeConstructor into an opaque Fingerprint to be used in DepNode. Not all DepNodeParams support being turned into a Fingerprint (they don’t need to if the corresponding DepNode is anonymous).

source

fn to_debug_str(&self, _: Tcx) -> String

Implementations on Foreign Types§

source§

impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for DefId

source§

fn fingerprint_style() -> FingerprintStyle

source§

fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint

source§

fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String

source§

fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option<Self>

source§

impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for OwnerId

source§

fn fingerprint_style() -> FingerprintStyle

source§

fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint

source§

fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String

source§

fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option<Self>

source§

impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for ()

source§

impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for LocalModDefId

source§

fn fingerprint_style() -> FingerprintStyle

source§

fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint

source§

fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String

source§

fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option<Self>

source§

impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for ModDefId

source§

fn fingerprint_style() -> FingerprintStyle

source§

fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint

source§

fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String

source§

fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option<Self>

source§

impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for HirId

source§

fn fingerprint_style() -> FingerprintStyle

source§

fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint

source§

fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String

source§

fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option<Self>

source§

impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for LocalDefId

source§

fn fingerprint_style() -> FingerprintStyle

source§

fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint

source§

fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String

source§

fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option<Self>

source§

impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for CrateNum

source§

fn fingerprint_style() -> FingerprintStyle

source§

fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint

source§

fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String

source§

fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option<Self>

source§

impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for (DefId, DefId)

Implementors§