Skip to main content

WorkspaceIntelligence

Struct WorkspaceIntelligence 

Source
pub struct WorkspaceIntelligence { /* private fields */ }
Expand description

Workspace-owned storage for language intelligence result sets.

Implementations§

Source§

impl WorkspaceIntelligence

Source

pub fn len(&self) -> usize

Return the number of stored result sets.

Source

pub fn is_empty(&self) -> bool

Returns true if there are no stored result sets.

Source

pub fn ids(&self) -> Vec<ResultSetId>

List all stored ids in deterministic order.

Source

pub fn get(&self, id: ResultSetId) -> Option<&IntelligenceResultSet>

Get a stored result set by id.

Source

pub fn get_mut(&mut self, id: ResultSetId) -> Option<&mut IntelligenceResultSet>

Get a mutable stored result set by id.

Source

pub fn remove(&mut self, id: ResultSetId) -> Option<IntelligenceResultSet>

Remove a stored result set.

Source

pub fn clear(&mut self)

Clear all stored result sets.

Source

pub fn create(&mut self, set: IntelligenceResultSet) -> ResultSetId

Insert a new result set and return its generated id.

Source

pub fn create_references( &mut self, title: impl Into<String>, locations: Vec<SymbolLocation>, ) -> ResultSetId

Convenience helper: create a references result set.

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WorkspaceIntelligence

Source§

fn default() -> WorkspaceIntelligence

Returns the “default value” for a type. 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, 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.