Struct ide::AnalysisHost
source · pub struct AnalysisHost { /* private fields */ }
Expand description
AnalysisHost
stores the current state of the world.
Implementations§
source§impl AnalysisHost
impl AnalysisHost
pub fn new(lru_capacity: Option<u16>) -> AnalysisHost
pub fn with_database(db: RootDatabase) -> AnalysisHost
pub fn update_lru_capacity(&mut self, lru_capacity: Option<u16>)
pub fn update_lru_capacities( &mut self, lru_capacities: &FxHashMap<Box<str>, u16>, )
sourcepub fn analysis(&self) -> Analysis
pub fn analysis(&self) -> Analysis
Returns a snapshot of the current state, which you can query for semantic information.
sourcepub fn apply_change(&mut self, change: ChangeWithProcMacros)
pub fn apply_change(&mut self, change: ChangeWithProcMacros)
Applies changes to the current state of the world. If there are outstanding snapshots, they will be canceled.
sourcepub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes, usize)>
pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes, usize)>
NB: this clears the database
pub fn request_cancellation(&mut self)
pub fn raw_database(&self) -> &RootDatabase
pub fn raw_database_mut(&mut self) -> &mut RootDatabase
Trait Implementations§
source§impl Debug for AnalysisHost
impl Debug for AnalysisHost
source§impl Default for AnalysisHost
impl Default for AnalysisHost
source§fn default() -> AnalysisHost
fn default() -> AnalysisHost
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for AnalysisHost
impl RefUnwindSafe for AnalysisHost
impl Send for AnalysisHost
impl !Sync for AnalysisHost
impl Unpin for AnalysisHost
impl UnwindSafe for AnalysisHost
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> Cast for T
impl<T> Cast for T
§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