pub struct SymbolIndex<'db> {
symbols: Box<[FileSymbol<'db>]>,
map: Map<Vec<u8>>,
}Fields§
§symbols: Box<[FileSymbol<'db>]>§map: Map<Vec<u8>>Implementations§
Source§impl<'db> SymbolIndex<'db>
impl<'db> SymbolIndex<'db>
Sourcepub fn library_symbols(
db: &'db dyn HirDatabase,
source_root_id: SourceRootId,
) -> &'db SymbolIndex<'db>
pub fn library_symbols( db: &'db dyn HirDatabase, source_root_id: SourceRootId, ) -> &'db SymbolIndex<'db>
The symbol index for a given source root within library_roots.
Sourcepub fn module_symbols(db: &dyn HirDatabase, module: Module) -> &SymbolIndex<'_>
pub fn module_symbols(db: &dyn HirDatabase, module: Module) -> &SymbolIndex<'_>
The symbol index for a given module. These modules should only be in source roots that are inside local_roots.
Source§impl<'db> SymbolIndex<'db>
impl<'db> SymbolIndex<'db>
fn new(symbols: Box<[FileSymbol<'db>]>) -> SymbolIndex<'db>
pub fn len(&self) -> usize
pub fn memory_size(&self) -> usize
fn range_to_map_value(start: usize, end: usize) -> u64
fn map_value_to_range(value: u64) -> (usize, usize)
Trait Implementations§
Source§impl Debug for SymbolIndex<'_>
impl Debug for SymbolIndex<'_>
Source§impl<'db> Default for SymbolIndex<'db>
impl<'db> Default for SymbolIndex<'db>
Source§fn default() -> SymbolIndex<'db>
fn default() -> SymbolIndex<'db>
Returns the “default value” for a type. Read more
Source§impl Hash for SymbolIndex<'_>
impl Hash for SymbolIndex<'_>
Source§impl PartialEq for SymbolIndex<'_>
impl PartialEq for SymbolIndex<'_>
Source§impl Update for SymbolIndex<'_>
impl Update for SymbolIndex<'_>
impl Eq for SymbolIndex<'_>
Auto Trait Implementations§
impl<'db> Freeze for SymbolIndex<'db>
impl<'db> !RefUnwindSafe for SymbolIndex<'db>
impl<'db> Send for SymbolIndex<'db>
impl<'db> Sync for SymbolIndex<'db>
impl<'db> Unpin for SymbolIndex<'db>
impl<'db> !UnwindSafe for SymbolIndex<'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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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