pub struct Resolver<'a> { /* private fields */ }Implementations§
Source§impl<'a> Resolver<'a>
impl<'a> Resolver<'a>
Sourcepub fn find_by_name(&self, name: &str) -> Vec<ItemId>
pub fn find_by_name(&self, name: &str) -> Vec<ItemId>
Find items by simple name using the prebuilt name index.
Sourcepub fn item_path(&self, id: &ItemId) -> Option<&PathBuf>
pub fn item_path(&self, id: &ItemId) -> Option<&PathBuf>
Get the file path where an item is defined.
Sourcepub fn item_kind(&self, id: &ItemId) -> Option<ItemType>
pub fn item_kind(&self, id: &ItemId) -> Option<ItemType>
Get the ItemType (kind) for a given item id.
pub fn new(graph: &'a KnowledgeGraph) -> Self
pub fn resolve_import(&self, from_file: &Path, raw_path: &str) -> Vec<ItemId>
pub fn is_item_function(&self, id: &ItemId) -> bool
pub fn is_file_level_module(&self, id: &ItemId) -> bool
Auto Trait Implementations§
impl<'a> Freeze for Resolver<'a>
impl<'a> RefUnwindSafe for Resolver<'a>
impl<'a> Send for Resolver<'a>
impl<'a> Sync for Resolver<'a>
impl<'a> Unpin for Resolver<'a>
impl<'a> UnsafeUnpin for Resolver<'a>
impl<'a> UnwindSafe for Resolver<'a>
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
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