pub struct AnalysisHost { /* private fields */ }Expand description
The single mutable owner of analysis state — one per project/workspace.
The input world is a virtual file system (FileId → UTF-8 text) held as salsa inputs; the
host never reads paths. Clients push text via AnalysisHost::apply_change.
Implementations§
Source§impl AnalysisHost
impl AnalysisHost
Sourcepub fn apply_change(&mut self, change: Change)
pub fn apply_change(&mut self, change: Change)
Apply a batch of input changes. The only mutation entry point — each set/remove
bumps the salsa revision (and cancels any in-flight reads on outstanding Analysis
handles). Edited files are LOW durability (they change every keystroke).
Sourcepub fn set_engine_api(&mut self, bytes: &[u8]) -> bool
pub fn set_engine_api(&mut self, bytes: &[u8]) -> bool
Install a runtime-fetched engine model — the wasm path (an extension_api blob the host
fetched and brotli-decoded, decoded here via EngineApi::from_bytes). Native builds use the
bundled model and normally never call this. Returns false (rather than panicking) if the
bytes fail to decode, leaving the model unset. First install wins (load-once); installing it
after queries have already run correctly recomputes them — the wasm engine-generation
input invalidates the affected reads, so loading the blob async (after opening a document) is
safe, not just loading it first.
Trait Implementations§
Source§impl Clone for AnalysisHost
impl Clone for AnalysisHost
Source§fn clone(&self) -> AnalysisHost
fn clone(&self) -> AnalysisHost
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnalysisHost
impl Debug for AnalysisHost
Source§impl Default for AnalysisHost
impl Default for AnalysisHost
Source§fn default() -> AnalysisHost
fn default() -> AnalysisHost
Auto Trait Implementations§
impl !Freeze for AnalysisHost
impl !RefUnwindSafe for AnalysisHost
impl !Sync for AnalysisHost
impl !UnwindSafe for AnalysisHost
impl Send for AnalysisHost
impl Unpin for AnalysisHost
impl UnsafeUnpin for AnalysisHost
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.