pub struct NoopResolver;Expand description
A no-op resolver that doesn’t resolve any references. Useful for tests or when symbol resolution isn’t needed.
Trait Implementations§
Source§impl TypeResolver for NoopResolver
impl TypeResolver for NoopResolver
Source§fn resolve_ref(
&self,
_symbol: SymbolRef,
_interner: &dyn TypeDatabase,
) -> Option<TypeId>
fn resolve_ref( &self, _symbol: SymbolRef, _interner: &dyn TypeDatabase, ) -> Option<TypeId>
Resolve a symbol reference to its structural type.
Returns None if the symbol cannot be resolved. Read more
Source§fn resolve_symbol_ref(
&self,
symbol: SymbolRef,
interner: &dyn TypeDatabase,
) -> Option<TypeId>
fn resolve_symbol_ref( &self, symbol: SymbolRef, interner: &dyn TypeDatabase, ) -> Option<TypeId>
Resolve a symbol reference to a structural type, preferring DefId-based lazy paths. Read more
Source§fn resolve_lazy(
&self,
_def_id: DefId,
_interner: &dyn TypeDatabase,
) -> Option<TypeId>
fn resolve_lazy( &self, _def_id: DefId, _interner: &dyn TypeDatabase, ) -> Option<TypeId>
Resolve a
DefId reference to its structural type. Read moreSource§fn get_type_params(&self, _symbol: SymbolRef) -> Option<Vec<TypeParamInfo>>
fn get_type_params(&self, _symbol: SymbolRef) -> Option<Vec<TypeParamInfo>>
Get type parameters for a symbol (for generic type aliases/interfaces).
Returns None by default; implementations can override to support
Application type expansion.
Source§fn get_lazy_type_params(&self, _def_id: DefId) -> Option<Vec<TypeParamInfo>>
fn get_lazy_type_params(&self, _def_id: DefId) -> Option<Vec<TypeParamInfo>>
Get type parameters for a
DefId (for generic type aliases/interfaces). Read moreSource§fn get_boxed_type(&self, _kind: IntrinsicKind) -> Option<TypeId>
fn get_boxed_type(&self, _kind: IntrinsicKind) -> Option<TypeId>
Get the boxed interface type for a primitive intrinsic (Rule #33).
For example,
IntrinsicKind::Number -> TypeId of the Number interface.
This enables primitives to be subtypes of their boxed interfaces.Source§fn is_boxed_def_id(&self, _def_id: DefId, _kind: IntrinsicKind) -> bool
fn is_boxed_def_id(&self, _def_id: DefId, _kind: IntrinsicKind) -> bool
Check if a
DefId corresponds to a boxed type for the given intrinsic kind.Source§fn is_boxed_type_id(&self, _type_id: TypeId, _kind: IntrinsicKind) -> bool
fn is_boxed_type_id(&self, _type_id: TypeId, _kind: IntrinsicKind) -> bool
Check if a
TypeId is any known resolved form of a boxed type. Read moreSource§fn get_array_base_type(&self) -> Option<TypeId>
fn get_array_base_type(&self) -> Option<TypeId>
Get the Array interface type from lib.d.ts.
Source§fn get_array_base_type_params(&self) -> &[TypeParamInfo]
fn get_array_base_type_params(&self) -> &[TypeParamInfo]
Get the type parameters for the Array interface.
Source§fn get_lazy_export(&self, _def_id: DefId, _name: Atom) -> Option<TypeId>
fn get_lazy_export(&self, _def_id: DefId, _name: Atom) -> Option<TypeId>
Get an export from a namespace/module by name. Read more
Source§fn get_lazy_enum_member(&self, _def_id: DefId, _name: Atom) -> Option<TypeId>
fn get_lazy_enum_member(&self, _def_id: DefId, _name: Atom) -> Option<TypeId>
Get enum member type by name from an enum
DefId. Read moreSource§fn is_numeric_enum(&self, _def_id: DefId) -> bool
fn is_numeric_enum(&self, _def_id: DefId) -> bool
Check if a
DefId corresponds to a numeric enum (not a string enum). Read moreSource§fn is_enum_type(&self, _type_id: TypeId, _interner: &dyn TypeDatabase) -> bool
fn is_enum_type(&self, _type_id: TypeId, _interner: &dyn TypeDatabase) -> bool
Check if a
TypeId represents a full Enum type (not a specific member).Source§fn is_user_enum_def(&self, _def_id: DefId) -> bool
fn is_user_enum_def(&self, _def_id: DefId) -> bool
Check if a
DefId represents a user-defined enum (not an intrinsic type).Source§fn get_base_type(
&self,
_type_id: TypeId,
_interner: &dyn TypeDatabase,
) -> Option<TypeId>
fn get_base_type( &self, _type_id: TypeId, _interner: &dyn TypeDatabase, ) -> Option<TypeId>
Get the base class type for a class/interface type. Read more
Auto Trait Implementations§
impl Freeze for NoopResolver
impl RefUnwindSafe for NoopResolver
impl Send for NoopResolver
impl Sync for NoopResolver
impl Unpin for NoopResolver
impl UnsafeUnpin for NoopResolver
impl UnwindSafe for NoopResolver
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