pub struct WorkspaceIntelligence { /* private fields */ }Expand description
Workspace-owned storage for language intelligence result sets.
Implementations§
Source§impl WorkspaceIntelligence
impl WorkspaceIntelligence
Sourcepub fn ids(&self) -> Vec<ResultSetId>
pub fn ids(&self) -> Vec<ResultSetId>
List all stored ids in deterministic order.
Sourcepub fn get(&self, id: ResultSetId) -> Option<&IntelligenceResultSet>
pub fn get(&self, id: ResultSetId) -> Option<&IntelligenceResultSet>
Get a stored result set by id.
Sourcepub fn get_mut(&mut self, id: ResultSetId) -> Option<&mut IntelligenceResultSet>
pub fn get_mut(&mut self, id: ResultSetId) -> Option<&mut IntelligenceResultSet>
Get a mutable stored result set by id.
Sourcepub fn remove(&mut self, id: ResultSetId) -> Option<IntelligenceResultSet>
pub fn remove(&mut self, id: ResultSetId) -> Option<IntelligenceResultSet>
Remove a stored result set.
Sourcepub fn create(&mut self, set: IntelligenceResultSet) -> ResultSetId
pub fn create(&mut self, set: IntelligenceResultSet) -> ResultSetId
Insert a new result set and return its generated id.
Sourcepub fn create_references(
&mut self,
title: impl Into<String>,
locations: Vec<SymbolLocation>,
) -> ResultSetId
pub fn create_references( &mut self, title: impl Into<String>, locations: Vec<SymbolLocation>, ) -> ResultSetId
Convenience helper: create a references result set.
Sourcepub fn mark_stale_for_uri(&mut self, uri: &str) -> bool
pub fn mark_stale_for_uri(&mut self, uri: &str) -> bool
Mark any result set that mentions uri as stale.
Returns true if at least one result set changed.
Trait Implementations§
Source§impl Debug for WorkspaceIntelligence
impl Debug for WorkspaceIntelligence
Source§impl Default for WorkspaceIntelligence
impl Default for WorkspaceIntelligence
Source§fn default() -> WorkspaceIntelligence
fn default() -> WorkspaceIntelligence
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WorkspaceIntelligence
impl RefUnwindSafe for WorkspaceIntelligence
impl Send for WorkspaceIntelligence
impl Sync for WorkspaceIntelligence
impl Unpin for WorkspaceIntelligence
impl UnsafeUnpin for WorkspaceIntelligence
impl UnwindSafe for WorkspaceIntelligence
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