pub struct ProjectInfo {
pub root: PathBuf,
pub name: Option<String>,
pub is_dampen: bool,
}Expand description
Information about a Dampen project
Fields§
§root: PathBufProject root directory (contains Cargo.toml)
name: Option<String>Project name (from Cargo.toml [package.name])
is_dampen: boolWhether this is a valid Dampen project
Implementations§
Source§impl ProjectInfo
impl ProjectInfo
Sourcepub fn detect() -> Result<Self, ProjectError>
pub fn detect() -> Result<Self, ProjectError>
Detect project information from current directory
Walks up directory tree looking for Cargo.toml. Validates if it’s a Dampen project by checking for dampen-core dependency.
Trait Implementations§
Source§impl Clone for ProjectInfo
impl Clone for ProjectInfo
Source§fn clone(&self) -> ProjectInfo
fn clone(&self) -> ProjectInfo
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 ProjectInfo
impl RefUnwindSafe for ProjectInfo
impl Send for ProjectInfo
impl Sync for ProjectInfo
impl Unpin for ProjectInfo
impl UnwindSafe for ProjectInfo
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