pub(super) struct Ctx<'db> {
pub(super) db: &'db dyn SourceDatabase,
tree: ItemTree,
source_ast_id_map: &'db AstIdMap,
span_map: OnceCell<SpanMap<'db>>,
file: HirFileId,
cfg_options: OnceCell<&'db CfgOptions>,
krate: Crate,
top_level: Vec<ModItemId>,
visibilities: FxIndexSet<RawVisibility>,
}Fields§
§db: &'db dyn SourceDatabase§tree: ItemTree§source_ast_id_map: &'db AstIdMap§span_map: OnceCell<SpanMap<'db>>§file: HirFileId§cfg_options: OnceCell<&'db CfgOptions>§krate: Crate§top_level: Vec<ModItemId>§visibilities: FxIndexSet<RawVisibility>Implementations§
Source§impl Ctx<'_>
impl Ctx<'_>
pub(super) fn lower_attrs(&self, owner: &dyn HasAttrs) -> AttrsOrCfg
Source§impl<'db> Ctx<'db>
impl<'db> Ctx<'db>
pub(super) fn new( db: &'db dyn SourceDatabase, file: HirFileId, krate: Crate, ) -> Self
pub(super) fn cfg_options(&self) -> &'db CfgOptions
pub(super) fn span_map(&self) -> SpanMap<'_>
pub(super) fn lower_module_items( self, item_owner: &dyn HasModuleItem, ) -> ItemTree
pub(super) fn lower_macro_stmts(self, stmts: MacroStmts) -> ItemTree
pub(super) fn lower_block(self, block: &BlockExpr) -> ItemTree
fn lower_mod_item(&mut self, item: &Item) -> Option<ModItemId>
pub(super) fn add_attrs(&mut self, item: ModItemId, attrs: AttrsOrCfg)
fn alloc_small( &mut self, ast_id: FileAstId<Item>, item: SmallModItem, ) -> ModItemId
fn alloc_big(&mut self, ast_id: FileAstId<Item>, item: BigModItem) -> ModItemId
fn lower_struct(&mut self, strukt: &Struct) -> Option<ModItemId>
fn tuple_struct_ctor_vis( &mut self, struct_vis: RawVisibility, fields: TupleFieldList, ) -> StructValueNsCtor
fn lower_union(&mut self, union: &Union) -> Option<ModItemId>
fn lower_enum(&mut self, enum_: &Enum) -> Option<ModItemId>
fn lower_function(&mut self, func: &Fn) -> Option<ModItemId>
fn lower_type_alias(&mut self, type_alias: &TypeAlias) -> Option<ModItemId>
fn lower_static(&mut self, static_: &Static) -> Option<ModItemId>
fn lower_const(&mut self, konst: &Const) -> ModItemId
fn lower_module(&mut self, module: &Module) -> Option<ModItemId>
fn lower_trait(&mut self, trait_def: &Trait) -> Option<ModItemId>
fn lower_impl(&mut self, impl_def: &Impl) -> ModItemId
fn lower_use(&mut self, use_item: &Use) -> Option<ModItemId>
fn lower_extern_crate( &mut self, extern_crate: &ExternCrate, ) -> Option<ModItemId>
fn lower_macro_call(&mut self, m: &MacroCall) -> Option<ModItemId>
fn lower_macro_rules(&mut self, m: &MacroRules) -> Option<ModItemId>
fn lower_macro_def(&mut self, m: &MacroDef) -> Option<ModItemId>
fn lower_extern_block(&mut self, block: &ExternBlock) -> ModItemId
fn lower_visibility(&mut self, item: &dyn HasVisibility) -> RawVisibilityId
fn lower_visibility_from_ast( &mut self, item: &dyn HasVisibility, ) -> RawVisibility
fn alloc_visibility(&mut self, vis: RawVisibility) -> RawVisibilityId
Auto Trait Implementations§
impl<'db> !Freeze for Ctx<'db>
impl<'db> !RefUnwindSafe for Ctx<'db>
impl<'db> !Send for Ctx<'db>
impl<'db> !Sync for Ctx<'db>
impl<'db> !UnwindSafe for Ctx<'db>
impl<'db> Unpin for Ctx<'db>
impl<'db> UnsafeUnpin for Ctx<'db>
Blanket Implementations§
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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