pub enum ProjectLocation {
Tracked {
path: Utf8PathBuf,
source: PathSource,
},
Untracked {
path: Utf8PathBuf,
source: PathSource,
},
External {
path: Utf8PathBuf,
source: PathSource,
},
Env {
variable: &'static str,
value: Option<String>,
},
None,
}Expand description
Where a location the project owns actually sits.
The four absent-looking cases are not one case. A repository-relative directory is checkable from a fresh clone. A directory outside the repository is not, and neither is one a variable resolves at run time, and a project that keeps none promises nothing at all.
Variants§
Tracked
A repository-relative directory under version control.
Fields
§
path: Utf8PathBufWhere it sits, relative to the instance root.
§
source: PathSourceWhat decided it.
Untracked
A repository-relative directory version control does not carry.
Fields
§
path: Utf8PathBufWhere it sits, relative to the instance root.
§
source: PathSourceWhat decided it.
External
A directory outside the repository.
Fields
§
path: Utf8PathBufWhere it sits, as the record carries it.
§
source: PathSourceWhat decided it.
Env
Wherever a variable resolves at run time.
Fields
None
The project keeps none.
Trait Implementations§
Source§impl Clone for ProjectLocation
impl Clone for ProjectLocation
Source§fn clone(&self) -> ProjectLocation
fn clone(&self) -> ProjectLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectLocation
impl Debug for ProjectLocation
impl Eq for ProjectLocation
Source§impl PartialEq for ProjectLocation
impl PartialEq for ProjectLocation
Source§impl Serialize for ProjectLocation
impl Serialize for ProjectLocation
impl StructuralPartialEq for ProjectLocation
Auto Trait Implementations§
impl Freeze for ProjectLocation
impl RefUnwindSafe for ProjectLocation
impl Send for ProjectLocation
impl Sync for ProjectLocation
impl Unpin for ProjectLocation
impl UnsafeUnpin for ProjectLocation
impl UnwindSafe for ProjectLocation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.