pub(crate) trait QueryConfigRestored<'tcx> {
type RestoredValue;
type Config: QueryConfig<QueryCtxt<'tcx>>;
const NAME: &'static &'static str;
// Required methods
fn config(tcx: TyCtxt<'tcx>) -> Self::Config;
fn restore(
value: <Self::Config as QueryConfig<QueryCtxt<'tcx>>>::Value,
) -> Self::RestoredValue;
}
Expand description
This is implemented per query. It allows restoring query values from their erased state and constructing a QueryConfig.
Required Associated Constants§
Required Associated Types§
type RestoredValue
type Config: QueryConfig<QueryCtxt<'tcx>>
Required Methods§
fn config(tcx: TyCtxt<'tcx>) -> Self::Config
fn restore( value: <Self::Config as QueryConfig<QueryCtxt<'tcx>>>::Value, ) -> Self::RestoredValue
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.