Struct RootDatabase
pub struct RootDatabase { /* private fields */ }
Implementations§
§impl RootDatabase
impl RootDatabase
pub fn request_cancellation(&mut self)
pub fn apply_change(&mut self, change: ChangeWithProcMacros)
pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes, usize)>
§impl RootDatabase
impl RootDatabase
pub fn new(lru_capacity: Option<u16>) -> RootDatabase
pub fn enable_proc_attr_macros(&mut self)
pub fn update_base_query_lru_capacities(&mut self, _lru_capacity: Option<u16>)
pub fn update_lru_capacities( &mut self, _lru_capacities: &HashMap<Box<str>, u16, FxBuildHasher>, )
pub fn snapshot(&self) -> RootDatabase
Trait Implementations§
§impl Clone for RootDatabase
impl Clone for RootDatabase
§fn clone(&self) -> RootDatabase
fn clone(&self) -> RootDatabase
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Database for RootDatabase
impl Database for RootDatabase
§fn salsa_event(&self, _event: &dyn Fn() -> Event)
fn salsa_event(&self, _event: &dyn Fn() -> Event)
This function is invoked by the salsa runtime at various points during execution.
You can customize what happens by implementing the [
UserData
][] trait.
By default, the event is logged at level debug using tracing facade. Read more§fn trigger_lru_eviction(&mut self)
fn trigger_lru_eviction(&mut self)
Enforces current LRU limits, evicting entries if necessary. Read more
§fn synthetic_write(&mut self, durability: Durability)
fn synthetic_write(&mut self, durability: Durability)
A “synthetic write” causes the system to act as though some
input of durability
durability
has changed, triggering a new revision.
This is mostly useful for profiling scenarios. Read more§fn report_untracked_read(&self)
fn report_untracked_read(&self)
Reports that the query depends on some state unknown to salsa. Read more
§fn ingredient_debug_name(
&self,
ingredient_index: IngredientIndex,
) -> Cow<'_, str>
fn ingredient_debug_name( &self, ingredient_index: IngredientIndex, ) -> Cow<'_, str>
Return the “debug name” (i.e., the struct name, etc) for an “ingredient”,
which are the fine-grained components we use to track data. This is intended
for debugging and the contents of the returned string are not semver-guaranteed. Read more
§fn unwind_if_revision_cancelled(&self)
fn unwind_if_revision_cancelled(&self)
Starts unwinding the stack if the current revision is cancelled. Read more
§impl Debug for RootDatabase
impl Debug for RootDatabase
§impl Default for RootDatabase
impl Default for RootDatabase
§fn default() -> RootDatabase
fn default() -> RootDatabase
Returns the “default value” for a type. Read more
§impl HasStorage for RootDatabase
impl HasStorage for RootDatabase
fn storage(&self) -> &Storage<RootDatabase>
fn storage_mut(&mut self) -> &mut Storage<RootDatabase>
§impl SourceDatabase for RootDatabase
impl SourceDatabase for RootDatabase
§fn source_root(&self, source_root_id: SourceRootId) -> SourceRootInput
fn source_root(&self, source_root_id: SourceRootId) -> SourceRootInput
Source root of the file.
fn set_file_text(&mut self, file_id: FileId, text: &str)
fn set_file_text_with_durability( &mut self, file_id: FileId, text: &str, durability: Durability, )
§fn set_source_root_with_durability(
&mut self,
source_root_id: SourceRootId,
source_root: Arc<SourceRoot>,
durability: Durability,
)
fn set_source_root_with_durability( &mut self, source_root_id: SourceRootId, source_root: Arc<SourceRoot>, durability: Durability, )
Source root of the file.
fn file_source_root(&self, id: FileId) -> FileSourceRootInput
fn set_file_source_root_with_durability( &mut self, id: FileId, source_root_id: SourceRootId, durability: Durability, )
fn resolve_path(&self, path: AnchoredPath<'_>) -> Option<FileId>
§impl Upcast<dyn DefDatabase> for RootDatabase
impl Upcast<dyn DefDatabase> for RootDatabase
§impl Upcast<dyn ExpandDatabase> for RootDatabase
impl Upcast<dyn ExpandDatabase> for RootDatabase
§impl Upcast<dyn HirDatabase> for RootDatabase
impl Upcast<dyn HirDatabase> for RootDatabase
§impl Upcast<dyn RootQueryDb> for RootDatabase
impl Upcast<dyn RootQueryDb> for RootDatabase
§impl Upcast<dyn SourceDatabase> for RootDatabase
impl Upcast<dyn SourceDatabase> for RootDatabase
impl RefUnwindSafe for RootDatabase
Auto Trait Implementations§
impl !Freeze for RootDatabase
impl Send for RootDatabase
impl !Sync for RootDatabase
impl Unpin for RootDatabase
impl !UnwindSafe for RootDatabase
Blanket Implementations§
§impl<T> AsDynDatabase for Twhere
T: Database,
impl<T> AsDynDatabase for Twhere
T: Database,
fn as_dyn_database(&self) -> &(dyn Database + 'static)
fn as_dyn_database_mut(&mut self) -> &mut (dyn Database + 'static)
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Cast for T
impl<T> Cast for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<DB> DefDatabase for DBwhere
DB: InternDatabase + ExpandDatabase + SourceDatabase + Upcast<dyn ExpandDatabase> + Upcast<dyn RootQueryDb>,
impl<DB> DefDatabase for DBwhere
DB: InternDatabase + ExpandDatabase + SourceDatabase + Upcast<dyn ExpandDatabase> + Upcast<dyn RootQueryDb>,
fn expand_proc_attr_macros(&self) -> bool
fn file_item_tree(&self, file_id: HirFileId) -> Arc<ItemTree>
fn block_item_tree(&self, block_id: BlockId) -> Arc<ItemTree>
fn file_item_tree_with_source_map( &self, file_id: HirFileId, ) -> (Arc<ItemTree>, Arc<ItemTreeSourceMaps>)
fn block_item_tree_with_source_map( &self, block_id: BlockId, ) -> (Arc<ItemTree>, Arc<ItemTreeSourceMaps>)
fn crate_local_def_map(&self, krate: Crate) -> (Arc<DefMap>, Arc<LocalDefMap>)
fn crate_def_map(&self, krate: Crate) -> Arc<DefMap>
fn block_def_map(&self, block: BlockId) -> Arc<DefMap>
fn macro_def(&self, m: MacroId) -> MacroDefId
fn variant_data(&self, id: VariantId) -> Arc<VariantData>
fn variant_data_with_diagnostics( &self, id: VariantId, ) -> (Arc<VariantData>, DefDiagnostics)
fn struct_data(&self, id: StructId) -> Arc<StructData>
fn union_data(&self, id: UnionId) -> Arc<StructData>
fn enum_data(&self, e: EnumId) -> Arc<EnumData>
fn enum_variants(&self, e: EnumId) -> Arc<EnumVariants>
fn enum_variant_data(&self, id: EnumVariantId) -> Arc<EnumVariantData>
fn impl_data(&self, e: ImplId) -> Arc<ImplData>
fn impl_items(&self, e: ImplId) -> Arc<ImplItems>
fn impl_items_with_diagnostics( &self, e: ImplId, ) -> (Arc<ImplItems>, DefDiagnostics)
fn trait_data(&self, e: TraitId) -> Arc<TraitData>
fn trait_items(&self, e: TraitId) -> Arc<TraitItems>
fn trait_items_with_diagnostics( &self, tr: TraitId, ) -> (Arc<TraitItems>, DefDiagnostics)
fn trait_alias_data(&self, e: TraitAliasId) -> Arc<TraitAliasData>
fn type_alias_data(&self, e: TypeAliasId) -> Arc<TypeAliasData>
fn function_data(&self, func: FunctionId) -> Arc<FunctionData>
fn const_data(&self, konst: ConstId) -> Arc<ConstData>
fn static_data(&self, statik: StaticId) -> Arc<StaticData>
fn macro2_data(&self, makro: Macro2Id) -> Arc<Macro2Data>
fn macro_rules_data(&self, makro: MacroRulesId) -> Arc<MacroRulesData>
fn proc_macro_data(&self, makro: ProcMacroId) -> Arc<ProcMacroData>
fn extern_crate_decl_data( &self, extern_crate: ExternCrateId, ) -> Arc<ExternCrateDeclData>
fn body_with_source_map( &self, def: DefWithBodyId, ) -> (Arc<Body>, Arc<BodySourceMap>)
fn body(&self, def: DefWithBodyId) -> Arc<Body>
fn expr_scopes(&self, def: DefWithBodyId) -> Arc<ExprScopes>
fn generic_params(&self, def: GenericDefId) -> Arc<GenericParams>
fn generic_params_with_source_map( &self, def: GenericDefId, ) -> (Arc<GenericParams>, Option<Arc<TypesSourceMap>>)
fn fields_attrs(&self, def: VariantId) -> Arc<ArenaMap<Idx<FieldData>, Attrs>>
fn fields_attrs_source_map( &self, def: VariantId, ) -> Arc<ArenaMap<Idx<FieldData>, AstPtr<Either<TupleField, RecordField>>>>
fn attrs(&self, def: AttrDefId) -> Attrs
fn lang_attr(&self, def: AttrDefId) -> Option<LangItem>
fn lang_item( &self, start_crate: Crate, item: LangItem, ) -> Option<LangItemTarget>
fn import_map(&self, krate: Crate) -> Arc<ImportMap>
fn field_visibilities( &self, var: VariantId, ) -> Arc<ArenaMap<Idx<FieldData>, Visibility>>
fn function_visibility(&self, def: FunctionId) -> Visibility
fn const_visibility(&self, def: ConstId) -> Visibility
fn crate_lang_items(&self, krate: Crate) -> Option<Arc<LangItems>>
fn notable_traits_in_deps(&self, krate: Crate) -> Arc<[Arc<[TraitId]>]>
fn crate_notable_traits(&self, krate: Crate) -> Option<Arc<[TraitId]>>
fn crate_supports_no_std(&self, crate_id: Crate) -> bool
fn include_macro_invoc( &self, crate_id: Crate, ) -> Arc<[(MacroCallId, EditionedFileId)]>
fn set_expand_proc_attr_macros(&mut self, __value: bool)
fn set_expand_proc_attr_macros_with_durability( &mut self, __value: bool, durability: Durability, )
§impl<DB> ExpandDatabase for DBwhere
DB: RootQueryDb,
impl<DB> ExpandDatabase for DBwhere
DB: RootQueryDb,
fn proc_macros(&self) -> Arc<ProcMacros>
fn proc_macros_for_crate(&self, krate: Crate) -> Option<Arc<CrateProcMacros>>
fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>
fn parse_or_expand(&self, file_id: HirFileId) -> SyntaxNode<RustLanguage>
fn parse_macro_expansion( &self, macro_file: MacroFileId, ) -> ValueResult<(Parse<SyntaxNode<RustLanguage>>, Arc<SpanMap<SyntaxContext>>), ExpandError>
fn span_map(&self, file_id: HirFileId) -> SpanMap
fn expansion_span_map( &self, file_id: MacroFileId, ) -> Arc<SpanMap<SyntaxContext>>
fn real_span_map(&self, file_id: EditionedFileId) -> Arc<RealSpanMap>
fn intern_macro_call(&self, macro_call: MacroCallLoc) -> MacroCallId
fn lookup_intern_macro_call(&self, macro_call: MacroCallId) -> MacroCallLoc
fn macro_arg( &self, id: MacroCallId, ) -> (Arc<TopSubtree<SpanData<SyntaxContext>>>, SyntaxFixupUndoInfo, SpanData<SyntaxContext>)
fn macro_arg_considering_derives( &self, id: MacroCallId, kind: &MacroCallKind, ) -> (Arc<TopSubtree<SpanData<SyntaxContext>>>, SyntaxFixupUndoInfo, SpanData<SyntaxContext>)
fn macro_expander(&self, id: MacroDefId) -> TokenExpander
fn decl_macro_expander( &self, def_crate: Crate, id: InFileWrapper<HirFileId, FileAstId<Macro>>, ) -> Arc<DeclarativeMacroExpander>
fn expand_proc_macro( &self, call: MacroCallId, ) -> ValueResult<Arc<TopSubtree<SpanData<SyntaxContext>>>, ExpandError>
fn proc_macro_span( &self, fun: InFileWrapper<HirFileId, FileAstId<Fn>>, ) -> SpanData<SyntaxContext>
fn parse_macro_expansion_error( &self, macro_call: MacroCallId, ) -> Option<Arc<ValueResult<Arc<[SyntaxError]>, ExpandError>>>
fn syntax_context(&self, file: HirFileId, edition: Edition) -> SyntaxContext
fn set_proc_macros(&mut self, __value: Arc<ProcMacros>)
fn set_proc_macros_with_durability( &mut self, __value: Arc<ProcMacros>, durability: Durability, )
§impl<DB> HirDatabase for DBwhere
DB: DefDatabase + Upcast<dyn DefDatabase> + Debug,
impl<DB> HirDatabase for DBwhere
DB: DefDatabase + Upcast<dyn DefDatabase> + Debug,
fn infer(&self, def: DefWithBodyId) -> Arc<InferenceResult>
fn mir_body(&self, def: DefWithBodyId) -> Result<Arc<MirBody>, MirLowerError>
fn mir_body_for_closure( &self, def: ClosureId<Interner>, ) -> Result<Arc<MirBody>, MirLowerError>
fn monomorphized_mir_body( &self, def: DefWithBodyId, subst: Substitution<Interner>, env: Arc<TraitEnvironment>, ) -> Result<Arc<MirBody>, MirLowerError>
fn monomorphized_mir_body_for_closure( &self, def: ClosureId<Interner>, subst: Substitution<Interner>, env: Arc<TraitEnvironment>, ) -> Result<Arc<MirBody>, MirLowerError>
fn borrowck( &self, def: DefWithBodyId, ) -> Result<Arc<[BorrowckResult]>, MirLowerError>
fn const_eval( &self, def: GeneralConstId, subst: Substitution<Interner>, trait_env: Option<Arc<TraitEnvironment>>, ) -> Result<Const<Interner>, ConstEvalError>
fn const_eval_static( &self, def: StaticId, ) -> Result<Const<Interner>, ConstEvalError>
fn const_eval_discriminant( &self, def: EnumVariantId, ) -> Result<i128, ConstEvalError>
fn lookup_impl_method( &self, env: Arc<TraitEnvironment>, func: FunctionId, fn_subst: Substitution<Interner>, ) -> (FunctionId, Substitution<Interner>)
fn layout_of_adt( &self, def: AdtId, subst: Substitution<Interner>, env: Arc<TraitEnvironment>, ) -> Result<Arc<LayoutData<RustcFieldIdx, RustcEnumVariantIdx>>, LayoutError>
fn layout_of_ty( &self, ty: Ty<Interner>, env: Arc<TraitEnvironment>, ) -> Result<Arc<LayoutData<RustcFieldIdx, RustcEnumVariantIdx>>, LayoutError>
fn target_data_layout( &self, krate: Crate, ) -> Result<Arc<TargetDataLayout>, Arc<str>>
fn dyn_compatibility_of_trait( &self, trait_: TraitId, ) -> Option<DynCompatibilityViolation>
fn ty(&self, def: TyDefId) -> Binders<Ty<Interner>>
fn type_for_type_alias_with_diagnostics( &self, def: TypeAliasId, ) -> (Binders<Ty<Interner>>, Option<ThinArc<(), TyLoweringDiagnostic>>)
fn value_ty(&self, def: ValueTyDefId) -> Option<Binders<Ty<Interner>>>
fn impl_self_ty_with_diagnostics( &self, def: ImplId, ) -> (Binders<Ty<Interner>>, Option<ThinArc<(), TyLoweringDiagnostic>>)
fn impl_self_ty(&self, def: ImplId) -> Binders<Ty<Interner>>
fn const_param_ty_with_diagnostics( &self, def: ConstParamId, ) -> (Ty<Interner>, Option<ThinArc<(), TyLoweringDiagnostic>>)
fn const_param_ty(&self, def: ConstParamId) -> Ty<Interner>
fn impl_trait_with_diagnostics( &self, def: ImplId, ) -> Option<(Binders<TraitRef<Interner>>, Option<ThinArc<(), TyLoweringDiagnostic>>)>
fn impl_trait(&self, def: ImplId) -> Option<Binders<TraitRef<Interner>>>
fn field_types_with_diagnostics( &self, var: VariantId, ) -> (Arc<ArenaMap<Idx<FieldData>, Binders<Ty<Interner>>>>, Option<ThinArc<(), TyLoweringDiagnostic>>)
fn field_types( &self, var: VariantId, ) -> Arc<ArenaMap<Idx<FieldData>, Binders<Ty<Interner>>>>
fn callable_item_signature(&self, def: CallableDefId) -> Binders<CallableSig>
fn return_type_impl_traits( &self, def: FunctionId, ) -> Option<Arc<Binders<ImplTraits>>>
fn type_alias_impl_traits( &self, def: TypeAliasId, ) -> Option<Arc<Binders<ImplTraits>>>
fn generic_predicates_for_param( &self, def: GenericDefId, param_id: TypeOrConstParamId, assoc_name: Option<Name>, ) -> GenericPredicates
fn generic_predicates(&self, def: GenericDefId) -> GenericPredicates
fn generic_predicates_without_parent_with_diagnostics( &self, def: GenericDefId, ) -> (GenericPredicates, Option<ThinArc<(), TyLoweringDiagnostic>>)
fn generic_predicates_without_parent( &self, def: GenericDefId, ) -> GenericPredicates
fn trait_environment_for_body( &self, def: DefWithBodyId, ) -> Arc<TraitEnvironment>
fn trait_environment(&self, def: GenericDefId) -> Arc<TraitEnvironment>
fn generic_defaults_with_diagnostics( &self, def: GenericDefId, ) -> (GenericDefaults, Option<ThinArc<(), TyLoweringDiagnostic>>)
fn generic_defaults(&self, def: GenericDefId) -> GenericDefaults
fn inherent_impls_in_crate(&self, krate: Crate) -> Arc<InherentImpls>
fn inherent_impls_in_block(&self, block: BlockId) -> Option<Arc<InherentImpls>>
fn incoherent_inherent_impl_crates( &self, krate: Crate, fp: TyFingerprint, ) -> SmallVec<[Crate; 2]>
fn trait_impls_in_crate(&self, krate: Crate) -> Arc<TraitImpls>
fn trait_impls_in_block(&self, block: BlockId) -> Option<Arc<TraitImpls>>
fn trait_impls_in_deps(&self, krate: Crate) -> Arc<[Arc<TraitImpls>]>
fn intern_callable_def( &self, callable_def: CallableDefId, ) -> InternedCallableDefId
fn intern_type_or_const_param_id( &self, param_id: TypeOrConstParamId, ) -> InternedTypeOrConstParamId
fn intern_lifetime_param_id( &self, param_id: LifetimeParamId, ) -> InternedLifetimeParamId
fn intern_impl_trait_id(&self, id: ImplTraitId) -> InternedOpaqueTyId
fn intern_closure(&self, id: InternedClosure) -> InternedClosureId
fn intern_coroutine(&self, id: InternedCoroutine) -> InternedCoroutineId
fn associated_ty_data( &self, id: AssocTypeId<Interner>, ) -> Arc<AssociatedTyDatum<Interner>>
fn trait_datum( &self, krate: Crate, trait_id: TraitId<Interner>, ) -> Arc<TraitDatum<Interner>>
fn adt_datum( &self, krate: Crate, struct_id: AdtId<Interner>, ) -> Arc<AdtDatum<Interner>>
fn impl_datum( &self, krate: Crate, impl_id: ImplId<Interner>, ) -> Arc<ImplDatum<Interner>>
fn fn_def_datum( &self, fn_def_id: FnDefId<Interner>, ) -> Arc<FnDefDatum<Interner>>
fn fn_def_variance(&self, fn_def_id: FnDefId<Interner>) -> Variances<Interner>
fn adt_variance(&self, adt_id: AdtId<Interner>) -> Variances<Interner>
fn variances_of(&self, def: GenericDefId) -> Option<Arc<[Variance]>>
fn associated_ty_value( &self, krate: Crate, id: AssociatedTyValueId<Interner>, ) -> Arc<AssociatedTyValue<Interner>>
fn normalize_projection( &self, projection: ProjectionTy<Interner>, env: Arc<TraitEnvironment>, ) -> Ty<Interner>
fn trait_solve( &self, krate: Crate, block: Option<BlockId>, goal: Canonical<InEnvironment<Goal<Interner>>>, ) -> Option<Solution<Interner>>
fn program_clauses_for_chalk_env( &self, krate: Crate, block: Option<BlockId>, env: Environment<Interner>, ) -> ProgramClauses<Interner>
fn has_drop_glue( &self, ty: Ty<Interner>, env: Arc<TraitEnvironment>, ) -> DropGlue
fn lookup_intern_callable_def(&self, id: InternedCallableDefId) -> CallableDefId
fn lookup_intern_type_or_const_param_id( &self, id: InternedTypeOrConstParamId, ) -> TypeOrConstParamId
fn lookup_intern_lifetime_param_id( &self, id: InternedLifetimeParamId, ) -> LifetimeParamId
fn lookup_intern_impl_trait_id(&self, id: InternedOpaqueTyId) -> ImplTraitId
fn lookup_intern_closure(&self, id: InternedClosureId) -> InternedClosure
fn lookup_intern_coroutine(&self, id: InternedCoroutineId) -> InternedCoroutine
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<DB> InternDatabase for DBwhere
DB: RootQueryDb,
impl<DB> InternDatabase for DBwhere
DB: RootQueryDb,
fn intern_use(&self, loc: ItemLoc<Use>) -> UseId
fn intern_extern_crate(&self, loc: ItemLoc<ExternCrate>) -> ExternCrateId
fn intern_function(&self, loc: AssocItemLoc<Function>) -> FunctionId
fn intern_struct(&self, loc: ItemLoc<Struct>) -> StructId
fn intern_union(&self, loc: ItemLoc<Union>) -> UnionId
fn intern_enum(&self, loc: ItemLoc<Enum>) -> EnumId
fn intern_enum_variant(&self, loc: EnumVariantLoc) -> EnumVariantId
fn intern_const(&self, loc: AssocItemLoc<Const>) -> ConstId
fn intern_static(&self, loc: AssocItemLoc<Static>) -> StaticId
fn intern_trait(&self, loc: ItemLoc<Trait>) -> TraitId
fn intern_trait_alias(&self, loc: ItemLoc<TraitAlias>) -> TraitAliasId
fn intern_type_alias(&self, loc: AssocItemLoc<TypeAlias>) -> TypeAliasId
fn intern_impl(&self, loc: ItemLoc<Impl>) -> ImplId
fn intern_extern_block(&self, loc: ItemLoc<ExternBlock>) -> ExternBlockId
fn intern_macro2(&self, loc: Macro2Loc) -> Macro2Id
fn intern_proc_macro(&self, loc: ProcMacroLoc) -> ProcMacroId
fn intern_macro_rules(&self, loc: MacroRulesLoc) -> MacroRulesId
fn intern_block(&self, loc: BlockLoc) -> BlockId
fn intern_anonymous_const(&self, id: ConstBlockLoc) -> ConstBlockId
fn intern_in_type_const(&self, id: InTypeConstLoc) -> InTypeConstId
fn lookup_intern_use(&self, id: UseId) -> ItemLoc<Use>
fn lookup_intern_extern_crate(&self, id: ExternCrateId) -> ItemLoc<ExternCrate>
fn lookup_intern_function(&self, id: FunctionId) -> AssocItemLoc<Function>
fn lookup_intern_struct(&self, id: StructId) -> ItemLoc<Struct>
fn lookup_intern_union(&self, id: UnionId) -> ItemLoc<Union>
fn lookup_intern_enum(&self, id: EnumId) -> ItemLoc<Enum>
fn lookup_intern_enum_variant(&self, id: EnumVariantId) -> EnumVariantLoc
fn lookup_intern_const(&self, id: ConstId) -> AssocItemLoc<Const>
fn lookup_intern_static(&self, id: StaticId) -> AssocItemLoc<Static>
fn lookup_intern_trait(&self, id: TraitId) -> ItemLoc<Trait>
fn lookup_intern_trait_alias(&self, id: TraitAliasId) -> ItemLoc<TraitAlias>
fn lookup_intern_type_alias(&self, id: TypeAliasId) -> AssocItemLoc<TypeAlias>
fn lookup_intern_impl(&self, id: ImplId) -> ItemLoc<Impl>
fn lookup_intern_extern_block(&self, id: ExternBlockId) -> ItemLoc<ExternBlock>
fn lookup_intern_macro2(&self, id: Macro2Id) -> Macro2Loc
fn lookup_intern_proc_macro(&self, id: ProcMacroId) -> ProcMacroLoc
fn lookup_intern_macro_rules(&self, id: MacroRulesId) -> MacroRulesLoc
fn lookup_intern_block(&self, id: BlockId) -> BlockLoc
fn lookup_intern_anonymous_const(&self, id: ConstBlockId) -> ConstBlockLoc
fn lookup_intern_in_type_const(&self, id: InTypeConstId) -> InTypeConstLoc
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more