pub struct Resolver { /* private fields */ }
Implementations§
source§impl Resolver
impl Resolver
sourcepub fn resolve_visibility(
&self,
db: &dyn DefDatabase,
visibility: &RawVisibility
) -> Option<Visibility>
pub fn resolve_visibility(
&self,
db: &dyn DefDatabase,
visibility: &RawVisibility
) -> Option<Visibility>
Resolves the visibility of the the RawVisibility
sourcepub fn resolve_path_as_value(
&self,
db: &dyn DefDatabase,
path: &Path
) -> Option<ResolveValueResult>
pub fn resolve_path_as_value(
&self,
db: &dyn DefDatabase,
path: &Path
) -> Option<ResolveValueResult>
Resolves the specified path
as a value. Returns a result that can also indicate that the
path was only partially resolved.
sourcepub fn resolve_path_as_value_fully(
&self,
db: &dyn DefDatabase,
path: &Path
) -> Option<(ValueNs, Visibility)>
pub fn resolve_path_as_value_fully(
&self,
db: &dyn DefDatabase,
path: &Path
) -> Option<(ValueNs, Visibility)>
Resolves the specified path
as a value. Returns either None
or the resolved path value.
sourcepub fn resolve_path_as_type(
&self,
db: &dyn DefDatabase,
path: &Path
) -> Option<(TypeNs, Visibility, Option<usize>)>
pub fn resolve_path_as_type(
&self,
db: &dyn DefDatabase,
path: &Path
) -> Option<(TypeNs, Visibility, Option<usize>)>
Resolves the specified path
as a type. Returns a result that can also indicate that the
path was only partially resolved.
sourcepub fn resolve_path_as_type_fully(
&self,
db: &dyn DefDatabase,
path: &Path
) -> Option<(TypeNs, Visibility)>
pub fn resolve_path_as_type_fully(
&self,
db: &dyn DefDatabase,
path: &Path
) -> Option<(TypeNs, Visibility)>
Resolves the specified path
as a type. Returns either None
or the resolved path type.
sourcepub fn module(&self) -> Option<ModuleId>
pub fn module(&self) -> Option<ModuleId>
Returns the module from which this instance resolves names
sourcepub fn body_owner(&self) -> Option<DefWithBodyId>
pub fn body_owner(&self) -> Option<DefWithBodyId>
If the resolver holds a scope from a body, returns that body.
sourcepub fn visit_all_names(
&self,
db: &dyn DefDatabase,
visitor: &mut dyn FnMut(Name, ScopeDef)
)
pub fn visit_all_names(
&self,
db: &dyn DefDatabase,
visitor: &mut dyn FnMut(Name, ScopeDef)
)
Calls the visitor
for each entry in scope.