Skip to main content

NoopResolver

Struct NoopResolver 

Source
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

Source§

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>

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>

Resolve a DefId reference to its structural type. Read more
Source§

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

Get type parameters for a DefId (for generic type aliases/interfaces). Read more
Source§

fn def_to_symbol_id(&self, _def_id: DefId) -> Option<SymbolId>

Get the SymbolId for a DefId (bridge for InheritanceGraph). Read more
Source§

fn symbol_to_def_id(&self, _symbol: SymbolRef) -> Option<DefId>

Get the DefId for a SymbolRef (Ref -> Lazy migration). Read more
Source§

fn get_def_kind(&self, _def_id: DefId) -> Option<DefKind>

Get the DefKind for a DefId (Task #32: Graph Isomorphism). Read more
Source§

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

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

Check if a TypeId is any known resolved form of a boxed type. Read more
Source§

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]

Get the type parameters for the Array interface.
Source§

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>

Get enum member type by name from an enum DefId. Read more
Source§

fn is_numeric_enum(&self, _def_id: DefId) -> bool

Check if a DefId corresponds to a numeric enum (not a string enum). Read more
Source§

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 get_enum_parent_def_id(&self, _member_def_id: DefId) -> Option<DefId>

Get the parent Enum’s DefId for an Enum Member’s DefId. Read more
Source§

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>

Get the base class type for a class/interface type. Read more
Source§

fn get_type_param_variance(&self, _def_id: DefId) -> Option<Arc<[Variance]>>

Get the variance mask for type parameters of a generic type (Task #41). Read more

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<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, 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<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
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