Trait mun_hir::HirDatabase
source · pub trait HirDatabase: Database + HasQueryGroup<HirDatabaseStorage> + DefDatabase + Upcast<dyn DefDatabase> {
fn target(&self) -> Target;
fn set_target(&mut self, value__: Target);
fn set_target_with_durability(
&mut self,
value__: Target,
durability__: Durability
);
fn target_data_layout(&self) -> Arc<TargetDataLayout>;
fn infer(&self, key0: DefWithBodyId) -> Arc<InferenceResult>;
fn lower_struct(&self, key0: Struct) -> Arc<LowerTyMap>;
fn lower_type_alias(&self, key0: TypeAlias) -> Arc<LowerTyMap>;
fn callable_sig(&self, key0: CallableDef) -> FnSig;
fn type_for_def(&self, key0: TypableDef, key1: Namespace) -> (Ty, bool);
}
Required Methods§
sourcefn set_target(&mut self, value__: Target)
fn set_target(&mut self, value__: Target)
Set the value of the target
input.
See target
for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.
sourcefn set_target_with_durability(
&mut self,
value__: Target,
durability__: Durability
)
fn set_target_with_durability(
&mut self,
value__: Target,
durability__: Durability
)
Set the value of the target
input and promise
that its value will never change again.
See target
for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.
sourcefn target_data_layout(&self) -> Arc<TargetDataLayout>
fn target_data_layout(&self) -> Arc<TargetDataLayout>
Returns the TargetDataLayout
for the current target