pub struct ProjectContext {
pub workspace_root: PathBuf,
pub current_file: Option<FileContext>,
pub cursor_position: Option<Position>,
pub project_type: ProjectType,
pub dependencies: Vec<Dependency>,
pub workspace_members: Vec<WorkspaceMember>,
pub build_targets: Vec<BuildTarget>,
pub active_features: Vec<String>,
pub env_vars: HashMap<String, String>,
}
Expand description
Project context containing all relevant information for command generation
Fields§
§workspace_root: PathBuf
Root directory of the workspace
current_file: Option<FileContext>
Current file being edited (if any)
cursor_position: Option<Position>
Current cursor position (if available)
project_type: ProjectType
Detected project type
dependencies: Vec<Dependency>
Project dependencies
workspace_members: Vec<WorkspaceMember>
Workspace members (for multi-crate workspaces)
build_targets: Vec<BuildTarget>
Build targets found in the project
active_features: Vec<String>
Active cargo features
env_vars: HashMap<String, String>
Environment variables relevant to the project
Trait Implementations§
Source§impl Clone for ProjectContext
impl Clone for ProjectContext
Source§fn clone(&self) -> ProjectContext
fn clone(&self) -> ProjectContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ProjectContext
impl RefUnwindSafe for ProjectContext
impl Send for ProjectContext
impl Sync for ProjectContext
impl Unpin for ProjectContext
impl UnwindSafe for ProjectContext
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