django-language-server/crates/djls-project/src/meta.rs
Josh Thomas ccf33290b3
Some checks failed
lint / pre-commit (push) Waiting to run
zizmor 🌈 / zizmor latest via PyPI (push) Waiting to run
release / build (push) Failing after 15s
release / test (push) Has been skipped
release / release (push) Has been cancelled
introduce salsa and integrate into djls-project crate (#139)
2025-05-09 23:16:39 -05:00

21 lines
402 B
Rust

use std::path::PathBuf;
#[derive(Clone, Debug)]
pub struct ProjectMetadata {
root: PathBuf,
venv: Option<PathBuf>,
}
impl ProjectMetadata {
pub fn new(root: PathBuf, venv: Option<PathBuf>) -> Self {
ProjectMetadata { root, venv }
}
pub fn root(&self) -> &PathBuf {
&self.root
}
pub fn venv(&self) -> Option<&PathBuf> {
self.venv.as_ref()
}
}