pub struct DeadCodeDetector { /* private fields */ }Expand description
Dead code detector
Implementations§
Source§impl DeadCodeDetector
impl DeadCodeDetector
Sourcepub fn new(workspace_index: WorkspaceIndex) -> Self
pub fn new(workspace_index: WorkspaceIndex) -> Self
Create a new dead code detector with the given workspace index
§Arguments
workspace_index- Indexed workspace containing symbol definitions and references
Sourcepub fn add_entry_point(&mut self, path: PathBuf)
pub fn add_entry_point(&mut self, path: PathBuf)
Add an entry point (main script)
Sourcepub fn analyze_file(&self, file_path: &Path) -> Result<Vec<DeadCode>, String>
pub fn analyze_file(&self, file_path: &Path) -> Result<Vec<DeadCode>, String>
Analyze a single file for dead code
Sourcepub fn analyze_workspace(&self) -> DeadCodeAnalysis
pub fn analyze_workspace(&self) -> DeadCodeAnalysis
Analyze entire workspace for dead code
Auto Trait Implementations§
impl Freeze for DeadCodeDetector
impl !RefUnwindSafe for DeadCodeDetector
impl Send for DeadCodeDetector
impl Sync for DeadCodeDetector
impl Unpin for DeadCodeDetector
impl UnsafeUnpin for DeadCodeDetector
impl !UnwindSafe for DeadCodeDetector
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