RootDatabase

Struct RootDatabase 

Source
pub struct RootDatabase { /* private fields */ }

Implementations§

Source§

impl RootDatabase

Source

pub fn request_cancellation(&mut self)

Source

pub fn apply_change(&mut self, change: ChangeWithProcMacros)

Source

pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes, usize)>

Source§

impl RootDatabase

Source

pub fn new(lru_capacity: Option<u16>) -> RootDatabase

Source

pub fn enable_proc_attr_macros(&mut self)

Source

pub fn update_base_query_lru_capacities(&mut self, _lru_capacity: Option<u16>)

Source

pub fn update_lru_capacities( &mut self, _lru_capacities: &FxHashMap<Box<str>, u16>, )

Trait Implementations§

Source§

impl Clone for RootDatabase

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Database for RootDatabase

Source§

fn trigger_lru_eviction(&mut self)

Enforces current LRU limits, evicting entries if necessary. Read more
Source§

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
Source§

fn trigger_cancellation(&mut self)

This method triggers cancellation. If you invoke it while a snapshot exists, it will block until that snapshot is dropped – if that snapshot is owned by the current thread, this could trigger deadlock.
Source§

fn report_untracked_read(&self)

Reports that the query depends on some state unknown to salsa. Read more
Source§

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
Source§

fn unwind_if_revision_cancelled(&self)

Starts unwinding the stack if the current revision is cancelled. Read more
Source§

fn attach<R>(&self, op: impl FnOnce(&Self) -> R) -> R
where Self: Sized,

Execute op with the database in thread-local storage for debug print-outs.
Source§

impl Debug for RootDatabase

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RootDatabase

Source§

fn default() -> RootDatabase

Returns the “default value” for a type. Read more
Source§

impl Drop for RootDatabase

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl HasStorage for RootDatabase

Source§

fn storage(&self) -> &Storage<Self>

Source§

fn storage_mut(&mut self) -> &mut Storage<Self>

Source§

impl SourceDatabase for RootDatabase

Source§

fn source_root(&self, source_root_id: SourceRootId) -> SourceRootInput

Source root of the file.

Source§

fn file_text(&self, file_id: FileId) -> FileText

Text of the file.
Source§

fn set_file_text(&mut self, file_id: FileId, text: &str)

Source§

fn set_file_text_with_durability( &mut self, file_id: FileId, text: &str, durability: Durability, )

Source§

fn set_source_root_with_durability( &mut self, source_root_id: SourceRootId, source_root: Arc<SourceRoot>, durability: Durability, )

Source root of the file.
Source§

fn file_source_root(&self, id: FileId) -> FileSourceRootInput

Source§

fn set_file_source_root_with_durability( &mut self, id: FileId, source_root_id: SourceRootId, durability: Durability, )

Source§

fn nonce_and_revision(&self) -> (Nonce, Revision)

Source§

fn resolve_path(&self, path: AnchoredPath<'_>) -> Option<FileId>

Source§

impl RefUnwindSafe for RootDatabase

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T, R> CollectAndApply<T, R> for T

Source§

fn collect_and_apply<I, F>(iter: I, f: F) -> R
where I: Iterator<Item = T>, F: FnOnce(&[T]) -> R,

Equivalent to f(&iter.collect::<Vec<_>>()).

Source§

type Output = R

Source§

impl<DB> DefDatabase for DB

Source§

fn expand_proc_attr_macros(&self) -> bool

Source§

fn file_item_tree(&self, file_id: HirFileId) -> &ItemTree

Source§

fn macro_def(&self, m: MacroId) -> MacroDefId

Source§

fn trait_signature(&self, trait_: TraitId) -> Arc<TraitSignature>

Source§

fn impl_signature(&self, impl_: ImplId) -> Arc<ImplSignature>

Source§

fn struct_signature(&self, struct_: StructId) -> Arc<StructSignature>

Source§

fn union_signature(&self, union_: UnionId) -> Arc<UnionSignature>

Source§

fn enum_signature(&self, e: EnumId) -> Arc<EnumSignature>

Source§

fn const_signature(&self, e: ConstId) -> Arc<ConstSignature>

Source§

fn static_signature(&self, e: StaticId) -> Arc<StaticSignature>

Source§

fn function_signature(&self, e: FunctionId) -> Arc<FunctionSignature>

Source§

fn type_alias_signature(&self, e: TypeAliasId) -> Arc<TypeAliasSignature>

Source§

fn trait_signature_with_source_map( &self, trait_: TraitId, ) -> (Arc<TraitSignature>, Arc<ExpressionStoreSourceMap>)

Source§

fn impl_signature_with_source_map( &self, impl_: ImplId, ) -> (Arc<ImplSignature>, Arc<ExpressionStoreSourceMap>)

Source§

fn struct_signature_with_source_map( &self, struct_: StructId, ) -> (Arc<StructSignature>, Arc<ExpressionStoreSourceMap>)

Source§

fn union_signature_with_source_map( &self, union_: UnionId, ) -> (Arc<UnionSignature>, Arc<ExpressionStoreSourceMap>)

Source§

fn enum_signature_with_source_map( &self, e: EnumId, ) -> (Arc<EnumSignature>, Arc<ExpressionStoreSourceMap>)

Source§

fn const_signature_with_source_map( &self, e: ConstId, ) -> (Arc<ConstSignature>, Arc<ExpressionStoreSourceMap>)

Source§

fn static_signature_with_source_map( &self, e: StaticId, ) -> (Arc<StaticSignature>, Arc<ExpressionStoreSourceMap>)

Source§

fn function_signature_with_source_map( &self, e: FunctionId, ) -> (Arc<FunctionSignature>, Arc<ExpressionStoreSourceMap>)

Source§

fn type_alias_signature_with_source_map( &self, e: TypeAliasId, ) -> (Arc<TypeAliasSignature>, Arc<ExpressionStoreSourceMap>)

Source§

fn body_with_source_map( &self, def: DefWithBodyId, ) -> (Arc<Body>, Arc<BodySourceMap>)

Source§

fn body(&self, def: DefWithBodyId) -> Arc<Body>

Source§

fn expr_scopes(&self, def: DefWithBodyId) -> Arc<ExprScopes>

Source§

fn generic_params(&self, def: GenericDefId) -> Arc<GenericParams>

Source§

fn generic_params_and_store( &self, def: GenericDefId, ) -> (Arc<GenericParams>, Arc<ExpressionStore>)

Source§

fn generic_params_and_store_and_source_map( &self, def: GenericDefId, ) -> (Arc<GenericParams>, Arc<ExpressionStore>, Arc<ExpressionStoreSourceMap>)

Source§

fn fields_attrs(&self, def: VariantId) -> Arc<ArenaMap<Idx<FieldData>, Attrs>>

Source§

fn fields_attrs_source_map( &self, def: VariantId, ) -> Arc<ArenaMap<Idx<FieldData>, AstPtr<Either<TupleField, RecordField>>>>

Source§

fn attrs(&self, def: AttrDefId) -> Attrs

Source§

fn lang_attr(&self, def: AttrDefId) -> Option<LangItem>

Source§

fn import_map(&self, krate: Crate) -> Arc<ImportMap>

Source§

fn field_visibilities( &self, var: VariantId, ) -> Arc<ArenaMap<Idx<FieldData>, Visibility>>

Source§

fn assoc_visibility(&self, def: AssocItemId) -> Visibility

Source§

fn notable_traits_in_deps(&self, krate: Crate) -> Arc<[Arc<[TraitId]>]>

Source§

fn crate_notable_traits(&self, krate: Crate) -> Option<Arc<[TraitId]>>

Source§

fn crate_supports_no_std(&self, crate_id: Crate) -> bool

Source§

fn include_macro_invoc( &self, crate_id: Crate, ) -> Arc<[(MacroCallId, EditionedFileId)]>

Source§

fn set_expand_proc_attr_macros(&mut self, __value: bool)

Source§

fn set_expand_proc_attr_macros_with_durability( &mut self, __value: bool, durability: Durability, )

Source§

impl<DB> ExpandDatabase for DB
where DB: RootQueryDb,

Source§

fn proc_macros(&self) -> Arc<ProcMacros>

Source§

fn proc_macros_for_crate(&self, krate: Crate) -> Option<Arc<CrateProcMacros>>

Source§

fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>

Source§

fn parse_or_expand(&self, file_id: HirFileId) -> SyntaxNode<RustLanguage>

Source§

fn parse_macro_expansion( &self, macro_file: MacroCallId, ) -> ValueResult<(Parse<SyntaxNode<RustLanguage>>, Arc<SpanMap<SyntaxContext>>), ExpandError>

Source§

fn span_map(&self, file_id: HirFileId) -> SpanMap

Source§

fn expansion_span_map( &self, file_id: MacroCallId, ) -> Arc<SpanMap<SyntaxContext>>

Source§

fn real_span_map(&self, file_id: EditionedFileId) -> Arc<RealSpanMap>

Source§

fn intern_macro_call(&self, macro_call: MacroCallLoc) -> MacroCallId

Source§

fn lookup_intern_macro_call(&self, macro_call: MacroCallId) -> MacroCallLoc

Source§

fn macro_arg( &self, id: MacroCallId, ) -> (Arc<TopSubtree<SpanData<SyntaxContext>>>, SyntaxFixupUndoInfo, SpanData<SyntaxContext>)

Source§

fn macro_arg_considering_derives( &self, id: MacroCallId, kind: &MacroCallKind, ) -> (Arc<TopSubtree<SpanData<SyntaxContext>>>, SyntaxFixupUndoInfo, SpanData<SyntaxContext>)

Source§

fn macro_expander(&self, id: MacroDefId) -> TokenExpander

Source§

fn decl_macro_expander( &self, def_crate: Crate, id: InFileWrapper<HirFileId, FileAstId<Macro>>, ) -> Arc<DeclarativeMacroExpander>

Source§

fn expand_proc_macro( &self, call: MacroCallId, ) -> ValueResult<Arc<TopSubtree<SpanData<SyntaxContext>>>, ExpandError>

Source§

fn proc_macro_span( &self, fun: InFileWrapper<HirFileId, FileAstId<Fn>>, ) -> SpanData<SyntaxContext>

Source§

fn parse_macro_expansion_error( &self, macro_call: MacroCallId, ) -> Option<Arc<ValueResult<Arc<[SyntaxError]>, ExpandError>>>

Source§

fn syntax_context(&self, file: HirFileId, edition: Edition) -> SyntaxContext

Source§

fn set_proc_macros(&mut self, __value: Arc<ProcMacros>)

Source§

fn set_proc_macros_with_durability( &mut self, __value: Arc<ProcMacros>, durability: Durability, )

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<DB> HirDatabase for DB
where DB: DefDatabase + Debug,

Source§

fn infer<'db>(&'db self, def: DefWithBodyId) -> Arc<InferenceResult<'db>>

Source§

fn mir_body<'db>( &'db self, def: DefWithBodyId, ) -> Result<Arc<MirBody<'db>>, MirLowerError<'db>>

Source§

fn mir_body_for_closure<'db>( &'db self, def: InternedClosureId, ) -> Result<Arc<MirBody<'db>>, MirLowerError<'db>>

Source§

fn monomorphized_mir_body<'db>( &'db self, def: DefWithBodyId, subst: GenericArgs<'db>, env: Arc<TraitEnvironment<'db>>, ) -> Result<Arc<MirBody<'db>>, MirLowerError<'db>>

Source§

fn monomorphized_mir_body_for_closure<'db>( &'db self, def: InternedClosureId, subst: GenericArgs<'db>, env: Arc<TraitEnvironment<'db>>, ) -> Result<Arc<MirBody<'db>>, MirLowerError<'db>>

Source§

fn borrowck<'db>( &'db self, def: DefWithBodyId, ) -> Result<Arc<[BorrowckResult<'db>]>, MirLowerError<'db>>

Source§

fn const_eval<'db>( &'db self, def: GeneralConstId, subst: GenericArgs<'db>, trait_env: Option<Arc<TraitEnvironment<'db>>>, ) -> Result<Const<'db>, ConstEvalError<'db>>

Source§

fn const_eval_static<'db>( &'db self, def: StaticId, ) -> Result<Const<'db>, ConstEvalError<'db>>

Source§

fn const_eval_discriminant<'db>( &'db self, def: EnumVariantId, ) -> Result<i128, ConstEvalError<'db>>

Source§

fn lookup_impl_method<'db>( &'db self, env: Arc<TraitEnvironment<'db>>, func: FunctionId, fn_subst: GenericArgs<'db>, ) -> (FunctionId, GenericArgs<'db>)

Source§

fn layout_of_adt<'db>( &'db self, def: AdtId, args: GenericArgs<'db>, trait_env: Arc<TraitEnvironment<'db>>, ) -> Result<Arc<LayoutData<RustcFieldIdx, RustcEnumVariantIdx>>, LayoutError>

Source§

fn layout_of_ty<'db>( &'db self, ty: Ty<'db>, env: Arc<TraitEnvironment<'db>>, ) -> Result<Arc<LayoutData<RustcFieldIdx, RustcEnumVariantIdx>>, LayoutError>

Source§

fn target_data_layout( &self, krate: Crate, ) -> Result<Arc<TargetDataLayout>, TargetLoadError>

Source§

fn dyn_compatibility_of_trait( &self, trait_: TraitId, ) -> Option<DynCompatibilityViolation>

Source§

fn ty<'db>(&'db self, def: TyDefId) -> EarlyBinder<DbInterner<'db>, Ty<'db>>

Source§

fn type_for_type_alias_with_diagnostics<'db>( &'db self, def: TypeAliasId, ) -> (EarlyBinder<DbInterner<'db>, Ty<'db>>, Option<ThinArc<(), TyLoweringDiagnostic>>)

Source§

fn value_ty<'db>( &'db self, def: ValueTyDefId, ) -> Option<EarlyBinder<DbInterner<'db>, Ty<'db>>>

Source§

fn impl_self_ty_with_diagnostics<'db>( &'db self, def: ImplId, ) -> (EarlyBinder<DbInterner<'db>, Ty<'db>>, Option<ThinArc<(), TyLoweringDiagnostic>>)

Source§

fn impl_self_ty<'db>( &'db self, def: ImplId, ) -> EarlyBinder<DbInterner<'db>, Ty<'db>>

Source§

fn const_param_ty_with_diagnostics<'db>( &'db self, def: ConstParamId, ) -> (Ty<'db>, Option<ThinArc<(), TyLoweringDiagnostic>>)

Source§

fn const_param_ty_ns<'db>(&'db self, def: ConstParamId) -> Ty<'db>

Source§

fn impl_trait_with_diagnostics<'db>( &'db self, def: ImplId, ) -> Option<(EarlyBinder<DbInterner<'db>, TraitRef<DbInterner<'db>>>, Option<ThinArc<(), TyLoweringDiagnostic>>)>

Source§

fn impl_trait<'db>( &'db self, def: ImplId, ) -> Option<EarlyBinder<DbInterner<'db>, TraitRef<DbInterner<'db>>>>

Source§

fn field_types_with_diagnostics<'db>( &'db self, var: VariantId, ) -> (Arc<ArenaMap<Idx<FieldData>, EarlyBinder<DbInterner<'db>, Ty<'db>>>>, Option<ThinArc<(), TyLoweringDiagnostic>>)

Source§

fn field_types<'db>( &'db self, var: VariantId, ) -> Arc<ArenaMap<Idx<FieldData>, EarlyBinder<DbInterner<'db>, Ty<'db>>>>

Source§

fn callable_item_signature<'db>( &'db self, def: CallableDefId, ) -> EarlyBinder<DbInterner<'db>, Binder<DbInterner<'db>, FnSig<DbInterner<'db>>>>

Source§

fn return_type_impl_traits<'db>( &'db self, def: FunctionId, ) -> Option<Arc<EarlyBinder<DbInterner<'db>, ImplTraits<'db>>>>

Source§

fn type_alias_impl_traits<'db>( &'db self, def: TypeAliasId, ) -> Option<Arc<EarlyBinder<DbInterner<'db>, ImplTraits<'db>>>>

Source§

fn generic_predicates_without_parent_with_diagnostics<'db>( &'db self, def: GenericDefId, ) -> (GenericPredicates<'db>, Option<ThinArc<(), TyLoweringDiagnostic>>)

Source§

fn generic_predicates_without_parent<'db>( &'db self, def: GenericDefId, ) -> GenericPredicates<'db>

Source§

fn generic_predicates_for_param<'db>( &'db self, def: GenericDefId, param_id: TypeOrConstParamId, assoc_name: Option<Name>, ) -> GenericPredicates<'db>

Source§

fn generic_predicates<'db>( &'db self, def: GenericDefId, ) -> GenericPredicates<'db>

Source§

fn trait_environment_for_body<'db>( &'db self, def: DefWithBodyId, ) -> Arc<TraitEnvironment<'db>>

Source§

fn trait_environment<'db>( &'db self, def: GenericDefId, ) -> Arc<TraitEnvironment<'db>>

Source§

fn generic_defaults_with_diagnostics<'db>( &'db self, def: GenericDefId, ) -> (GenericDefaults<'db>, Option<ThinArc<(), TyLoweringDiagnostic>>)

Source§

fn generic_defaults<'db>(&'db self, def: GenericDefId) -> GenericDefaults<'db>

Source§

fn inherent_impls_in_crate(&self, krate: Crate) -> Arc<InherentImpls>

Source§

fn inherent_impls_in_block(&self, block: BlockId) -> Option<Arc<InherentImpls>>

Source§

fn incoherent_inherent_impl_crates( &self, krate: Crate, fp: TyFingerprint, ) -> SmallVec<[Crate; 2]>

Source§

fn trait_impls_in_crate(&self, krate: Crate) -> Arc<TraitImpls>

Source§

fn trait_impls_in_block(&self, block: BlockId) -> Option<Arc<TraitImpls>>

Source§

fn trait_impls_in_deps(&self, krate: Crate) -> Arc<[Arc<TraitImpls>]>

Source§

fn intern_impl_trait_id(&self, id: ImplTraitId<'_>) -> InternedOpaqueTyId

Source§

fn intern_closure(&self, id: InternedClosure) -> InternedClosureId

Source§

fn intern_coroutine(&self, id: InternedCoroutine) -> InternedCoroutineId

Source§

fn variances_of<'db>(&'db self, def: GenericDefId) -> VariancesOf<'db>

Source§

fn lookup_intern_impl_trait_id(&self, id: InternedOpaqueTyId) -> ImplTraitId<'_>

Source§

fn lookup_intern_closure(&self, id: InternedClosureId) -> InternedClosure

Source§

fn lookup_intern_coroutine(&self, id: InternedCoroutineId) -> InternedCoroutine

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<DB> InternDatabase for DB
where DB: RootQueryDb,

Source§

fn intern_use(&self, loc: ItemLoc<Use>) -> UseId

Source§

fn intern_extern_crate(&self, loc: ItemLoc<ExternCrate>) -> ExternCrateId

Source§

fn intern_function(&self, loc: AssocItemLoc<Fn>) -> FunctionId

Source§

fn intern_struct(&self, loc: ItemLoc<Struct>) -> StructId

Source§

fn intern_union(&self, loc: ItemLoc<Union>) -> UnionId

Source§

fn intern_enum(&self, loc: ItemLoc<Enum>) -> EnumId

Source§

fn intern_enum_variant(&self, loc: EnumVariantLoc) -> EnumVariantId

Source§

fn intern_const(&self, loc: AssocItemLoc<Const>) -> ConstId

Source§

fn intern_static(&self, loc: AssocItemLoc<Static>) -> StaticId

Source§

fn intern_trait(&self, loc: ItemLoc<Trait>) -> TraitId

Source§

fn intern_type_alias(&self, loc: AssocItemLoc<TypeAlias>) -> TypeAliasId

Source§

fn intern_impl(&self, loc: ItemLoc<Impl>) -> ImplId

Source§

fn intern_extern_block(&self, loc: ItemLoc<ExternBlock>) -> ExternBlockId

Source§

fn intern_macro2(&self, loc: Macro2Loc) -> Macro2Id

Source§

fn intern_proc_macro(&self, loc: ProcMacroLoc) -> ProcMacroId

Source§

fn intern_macro_rules(&self, loc: MacroRulesLoc) -> MacroRulesId

Source§

fn intern_block(&self, loc: BlockLoc) -> BlockId

Source§

fn lookup_intern_use(&self, id: UseId) -> ItemLoc<Use>

Source§

fn lookup_intern_extern_crate(&self, id: ExternCrateId) -> ItemLoc<ExternCrate>

Source§

fn lookup_intern_function(&self, id: FunctionId) -> AssocItemLoc<Fn>

Source§

fn lookup_intern_struct(&self, id: StructId) -> ItemLoc<Struct>

Source§

fn lookup_intern_union(&self, id: UnionId) -> ItemLoc<Union>

Source§

fn lookup_intern_enum(&self, id: EnumId) -> ItemLoc<Enum>

Source§

fn lookup_intern_enum_variant(&self, id: EnumVariantId) -> EnumVariantLoc

Source§

fn lookup_intern_const(&self, id: ConstId) -> AssocItemLoc<Const>

Source§

fn lookup_intern_static(&self, id: StaticId) -> AssocItemLoc<Static>

Source§

fn lookup_intern_trait(&self, id: TraitId) -> ItemLoc<Trait>

Source§

fn lookup_intern_type_alias(&self, id: TypeAliasId) -> AssocItemLoc<TypeAlias>

Source§

fn lookup_intern_impl(&self, id: ImplId) -> ItemLoc<Impl>

Source§

fn lookup_intern_extern_block(&self, id: ExternBlockId) -> ItemLoc<ExternBlock>

Source§

fn lookup_intern_macro2(&self, id: Macro2Id) -> Macro2Loc

Source§

fn lookup_intern_proc_macro(&self, id: ProcMacroId) -> ProcMacroLoc

Source§

fn lookup_intern_macro_rules(&self, id: MacroRulesId) -> MacroRulesLoc

Source§

fn lookup_intern_block(&self, id: BlockId) -> BlockLoc

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoBox<dyn Any> for T
where T: Any,

Source§

fn into_box(self) -> Box<dyn Any>

Convert self into the appropriate boxed form.
Source§

impl<T> IntoBox<dyn Any + Send> for T
where T: Any + Send,

Source§

fn into_box(self) -> Box<dyn Any + Send>

Convert self into the appropriate boxed form.
Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<DB> LineIndexDatabase for DB
where DB: RootQueryDb,

Source§

fn line_index(&self, file_id: FileId) -> Arc<LineIndex>

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<DB> RootQueryDb for DB

Source§

impl<DB> SymbolsDatabase for DB

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<I, T, U> Upcast<I, U> for T
where U: UpcastFrom<I, T>,

Source§

fn upcast(self, interner: I) -> U

Source§

impl<I, T> UpcastFrom<I, T> for T

Source§

fn upcast_from(from: T, _tcx: I) -> T

Source§

impl<DB> WithFixture for DB
where DB: ExpandDatabase + SourceDatabase + Default + 'static,

Source§

fn with_single_file(ra_fixture: &str) -> (Self, EditionedFileId)

Source§

fn with_many_files(ra_fixture: &str) -> (Self, Vec<EditionedFileId>)

Source§

fn with_files(ra_fixture: &str) -> Self

Source§

fn with_files_extra_proc_macros( ra_fixture: &str, proc_macros: Vec<(String, ProcMacro)>, ) -> Self

Source§

fn with_position( ra_fixture: &str, ) -> (Self, FilePositionWrapper<EditionedFileId>)

Source§

fn with_range(ra_fixture: &str) -> (Self, FileRangeWrapper<EditionedFileId>)

Source§

fn with_range_or_offset( ra_fixture: &str, ) -> (Self, EditionedFileId, RangeOrOffset)

Source§

fn test_crate(&self) -> Crate

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<'a, T> Captures<'a> for T
where T: ?Sized,