pub enum PlanZone {
Tracked {
path: Utf8PathBuf,
},
Untracked {
path: Utf8PathBuf,
},
Env,
None,
}Expand description
Where the project’s planning tool writes its entry documents.
The kind is part of the value because the three absent cases are not one
case. A tracked zone is a directory every clone has, so a command may
check it and an absent directory is drift. An untracked zone and a zone
reached through PLAN_ZONE_VAR are absent on a fresh clone, so the
same failure there would report a layout the project never promised.
Variants§
Tracked
A repository-relative directory under version control.
Fields
path: Utf8PathBufWhere the zone sits, relative to the instance root.
Untracked
A repository-relative directory version control does not carry.
Fields
path: Utf8PathBufWhere the zone sits, relative to the instance root.
Env
Wherever PLAN_ZONE_VAR resolves at run time.
None
The project keeps no plan zone.
Implementations§
Source§impl PlanZone
impl PlanZone
Sourcepub fn parse(value: &str) -> Result<Self, DeclaredPathError>
pub fn parse(value: &str) -> Result<Self, DeclaredPathError>
Read the --plan-zone argument’s four forms.
none and env are words rather than paths, so a directory with
either name is written ./none or ./env.
§Errors
DeclaredPathError for a path that is empty, absolute, or leaves
the repository.
Sourcepub const fn path(&self) -> Option<&Utf8PathBuf>
pub const fn path(&self) -> Option<&Utf8PathBuf>
The recorded path, whatever the kind carries.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PlanZone
impl<'de> Deserialize<'de> for PlanZone
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PlanZone
impl StructuralPartialEq for PlanZone
Auto Trait Implementations§
impl Freeze for PlanZone
impl RefUnwindSafe for PlanZone
impl Send for PlanZone
impl Sync for PlanZone
impl Unpin for PlanZone
impl UnsafeUnpin for PlanZone
impl UnwindSafe for PlanZone
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.