pub struct PathTopologyConfig {
pub canonical_root: Option<String>,
pub alias_root: Option<String>,
}Expand description
Path topology configuration.
Overrides the default canonical and alias project roots used by
crate::path_topology::PathTopologyPolicy. This is useful on platforms
such as macOS where SIP prevents using /data/projects and the user must
choose a different root (e.g. ~/Projects).
[path_topology]
canonical_root = "/Users/me/Projects"
alias_root = "/Users/me/p"Fields§
§canonical_root: Option<String>Canonical project root directory.
Defaults to /data/projects when absent.
alias_root: Option<String>Alias (symlink) root that points at the canonical root.
Defaults to /dp when absent.
Implementations§
Source§impl PathTopologyConfig
impl PathTopologyConfig
Sourcepub fn to_policy(&self) -> PathTopologyPolicy
pub fn to_policy(&self) -> PathTopologyPolicy
Build a crate::path_topology::PathTopologyPolicy from this config,
falling back to the compiled-in defaults for any field left unset.
Empty strings are treated as unset (fall back to defaults).
Tilde prefixes (~/...) are expanded to the user’s home directory.
Trait Implementations§
Source§impl Clone for PathTopologyConfig
impl Clone for PathTopologyConfig
Source§fn clone(&self) -> PathTopologyConfig
fn clone(&self) -> PathTopologyConfig
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 PathTopologyConfig
impl Debug for PathTopologyConfig
Source§impl Default for PathTopologyConfig
impl Default for PathTopologyConfig
Source§fn default() -> PathTopologyConfig
fn default() -> PathTopologyConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PathTopologyConfig
impl<'de> Deserialize<'de> for PathTopologyConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PathTopologyConfig
impl RefUnwindSafe for PathTopologyConfig
impl Send for PathTopologyConfig
impl Sync for PathTopologyConfig
impl Unpin for PathTopologyConfig
impl UnsafeUnpin for PathTopologyConfig
impl UnwindSafe for PathTopologyConfig
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