pub struct App {Show 37 fields
pub items: Vec<AnalyzedItem>,
pub filtered_items: Vec<usize>,
pub crate_info: Option<CrateInfo>,
pub dependency_tree: Vec<(String, usize)>,
pub filtered_dependency_indices: Vec<usize>,
pub crate_registry: CrateRegistry,
pub installed_crates_list: Vec<String>,
pub selected_installed_crate: Option<InstalledCrate>,
pub installed_crate_items: Vec<AnalyzedItem>,
pub installed_crate_filtered: Vec<usize>,
pub search_input: String,
pub current_tab: Tab,
pub focus: Focus,
pub list_state: ListState,
pub completion_selected: usize,
pub show_completion: bool,
pub show_help: bool,
pub show_settings: bool,
pub status_message: String,
pub candidates: Vec<CompletionCandidate>,
pub filtered_candidates: Vec<CompletionCandidate>,
pub settings: Settings,
pub theme: Theme,
pub should_quit: bool,
pub project_path: Option<PathBuf>,
pub copilot_chat_open: bool,
pub copilot_chat_messages: Vec<(String, String)>,
pub copilot_chat_input: String,
pub copilot_chat_loading: bool,
pub copilot_chat_scroll: usize,
pub target_size_bytes: Option<u64>,
pub crate_docs_cache: HashMap<String, CrateDocInfo>,
pub crate_docs_loading: Option<String>,
pub crate_docs_failed: HashSet<String>,
pub crate_docs_rx: Receiver<(String, Option<CrateDocInfo>)>,
pub copilot_tx: Sender<String>,
pub copilot_rx: Receiver<String>,
/* private fields */
}Expand description
Main application state
Fields§
§items: Vec<AnalyzedItem>§filtered_items: Vec<usize>§crate_info: Option<CrateInfo>§dependency_tree: Vec<(String, usize)>§filtered_dependency_indices: Vec<usize>Indices into dependency_tree for Crates tab list (filtered by search). Empty = not computed.
crate_registry: CrateRegistry§installed_crates_list: Vec<String>§selected_installed_crate: Option<InstalledCrate>§installed_crate_items: Vec<AnalyzedItem>§installed_crate_filtered: Vec<usize>§search_input: String§current_tab: Tab§focus: Focus§list_state: ListState§completion_selected: usize§show_completion: bool§show_help: bool§show_settings: bool§status_message: String§candidates: Vec<CompletionCandidate>§filtered_candidates: Vec<CompletionCandidate>§settings: Settings§theme: Theme§should_quit: bool§project_path: Option<PathBuf>§copilot_chat_open: bool§copilot_chat_messages: Vec<(String, String)>(role, content) with role “user” or “assistant”
copilot_chat_input: String§copilot_chat_loading: bool§copilot_chat_scroll: usize§target_size_bytes: Option<u64>Size of target/ directory in bytes (build artifacts), if computed.
crate_docs_cache: HashMap<String, CrateDocInfo>§crate_docs_loading: Option<String>§crate_docs_failed: HashSet<String>§crate_docs_rx: Receiver<(String, Option<CrateDocInfo>)>§copilot_tx: Sender<String>§copilot_rx: Receiver<String>Implementations§
Source§impl App
impl App
pub fn new() -> Self
Sourcepub fn load_settings(&mut self) -> Result<()>
pub fn load_settings(&mut self) -> Result<()>
Load settings from config file
Sourcepub fn cycle_theme(&mut self)
pub fn cycle_theme(&mut self)
Cycle to the next theme and persist to config
pub fn toggle_settings(&mut self)
Sourcepub fn analyze_project(&mut self, path: &Path) -> Result<()>
pub fn analyze_project(&mut self, path: &Path) -> Result<()>
Analyze a Rust project
Sourcepub fn update_candidates(&mut self)
pub fn update_candidates(&mut self)
Update completion candidates from analyzed items
Sourcepub fn filter_items(&mut self)
pub fn filter_items(&mut self)
Filter items based on search input and current tab
Sourcepub fn scan_installed_crates(&mut self) -> Result<()>
pub fn scan_installed_crates(&mut self) -> Result<()>
Scan for installed crates
Sourcepub fn search_qualified_path(&mut self) -> bool
pub fn search_qualified_path(&mut self) -> bool
Parse qualified path and navigate to crate + filter items E.g., “serde::de::Deserialize” -> select serde crate, filter for de::Deserialize
Sourcepub fn select_installed_crate(&mut self, name: &str) -> Result<()>
pub fn select_installed_crate(&mut self, name: &str) -> Result<()>
Select an installed crate and analyze it
Sourcepub fn clear_installed_crate(&mut self)
pub fn clear_installed_crate(&mut self)
Clear selected installed crate (go back to list)
Sourcepub fn installed_crates_display_list(&self) -> Vec<String>
pub fn installed_crates_display_list(&self) -> Vec<String>
Crates to show in Crates tab: project dependencies when we have a Cargo project, else all installed.
Sourcepub fn selected_crate_name_for_display(&self) -> Option<String>
pub fn selected_crate_name_for_display(&self) -> Option<String>
Crate name for “open in browser” (o key): current crate when inside one, or selected dep from list.
Sourcepub fn selected_dependency_name(&self) -> Option<String>
pub fn selected_dependency_name(&self) -> Option<String>
Selected crate name in Crates tab (root or a dep). None if inside a crate, empty list, or wrong tab.
Sourcepub fn dependency_root_name(&self) -> Option<&str>
pub fn dependency_root_name(&self) -> Option<&str>
Root crate name in dependency tree (first entry, depth 0). None if no tree.
Sourcepub fn poll_crate_docs_rx(&mut self)
pub fn poll_crate_docs_rx(&mut self)
Process any received crate doc fetch results (call each frame).
Sourcepub fn maybe_start_crate_doc_fetch(&mut self)
pub fn maybe_start_crate_doc_fetch(&mut self)
If on Crates tab and selected crate is not root and not cached/loading/failed, start fetch in background.
Sourcepub fn get_current_list_len(&self) -> usize
pub fn get_current_list_len(&self) -> usize
Get current list length based on tab and selection state
Sourcepub fn selected_item(&self) -> Option<&AnalyzedItem>
pub fn selected_item(&self) -> Option<&AnalyzedItem>
Get the currently selected item
Sourcepub fn get_filtered_items(&self) -> Vec<&AnalyzedItem>
pub fn get_filtered_items(&self) -> Vec<&AnalyzedItem>
Get filtered items as references
pub fn next_item(&mut self)
pub fn prev_item(&mut self)
pub fn next_tab(&mut self)
pub fn prev_tab(&mut self)
pub fn next_focus(&mut self)
pub fn prev_focus(&mut self)
pub fn next_completion(&mut self)
pub fn prev_completion(&mut self)
pub fn select_completion(&mut self)
pub fn on_char(&mut self, c: char)
pub fn on_backspace(&mut self)
pub fn clear_search(&mut self)
pub fn toggle_help(&mut self)
Sourcepub fn build_copilot_context(&self) -> Option<String>
pub fn build_copilot_context(&self) -> Option<String>
Build context string for the currently selected item (for Copilot).
Sourcepub fn submit_copilot_message(&mut self)
pub fn submit_copilot_message(&mut self)
Submit the current chat input to Copilot (spawns thread, sets loading).
Sourcepub fn toggle_copilot_chat(&mut self)
pub fn toggle_copilot_chat(&mut self)
Toggle Copilot chat panel; when opening with an item selected, focus chat.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl !Sync for App
impl Unpin for App
impl UnwindSafe for App
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
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> 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>
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>
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