pub struct ProjectAnalysis {
pub snapshots: Vec<(PathBuf, String)>,
pub errors: Vec<AttributedError>,
pub index: ProjectIndex,
pub hints: FileHints,
pub expr_types: FileExprTypes,
pub locals: FileLocals,
pub requirements: FileRequirements,
pub unit_sources: HashMap<String, Vec<PathBuf>>,
}Expand description
v0.24: the analyse-mode result — every discovered file’s analysed text snapshot (positions must convert against the text that was analysed, not a newer buffer) plus the attributed diagnostics.
Fields§
§snapshots: Vec<(PathBuf, String)>(project-relative source path, analysed text) for every file read,
including clean files (the LSP needs them to clear diagnostics).
errors: Vec<AttributedError>§index: ProjectIndexv0.25 (ADR 0053): the project-wide binding index. Empty when the pipeline bails before resolution (discovery/parse failures).
hints: FileHintsv0.27 (ADR 0056): per-file inferred-type inlay hints — (binding-name span, label), span-ordered, harvested from the checker’s binding
sites. Empty for files the pipeline never type-checked.
expr_types: FileExprTypesv0.30.2 (ADR 0063): per-file expression types — (expr span, Ty),
captured on the Ok path (a file that checks clean), for .-member
completion’s receiver typing. Empty for files with errors (the
clean-file ceiling) and for synthetic files.
locals: FileLocalsv0.31 (ADR 0064): per-file local bindings with their scope ranges —
let/let <-, fn/handler/lambda params — for the scope-at-offset
query backing locals completion + navigation. Synthetic files muted.
requirements: FileRequirementsv0.99: per-file capability-requirement ledger — every capability-consuming
site (direct call, store op), covered or not, with its provenance. Drives
the ghost given inlay hint and capability hover. Empty for files the
pipeline never type-checked, and for synthetic/test files (muted).
unit_sources: HashMap<String, Vec<PathBuf>>Slice 6b (ADR 0095): qualified unit name → the project source file(s) that comprise it, in discovery order — the unit→file map backing document links and consumed-context navigation. Excludes synthetic (toolchain- injected) units; empty when the pipeline bails before the checker.
Auto Trait Implementations§
impl Freeze for ProjectAnalysis
impl RefUnwindSafe for ProjectAnalysis
impl Send for ProjectAnalysis
impl Sync for ProjectAnalysis
impl Unpin for ProjectAnalysis
impl UnsafeUnpin for ProjectAnalysis
impl UnwindSafe for ProjectAnalysis
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
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);