#[non_exhaustive]pub enum AppRootPolicy {
PlatformDefault,
EnvironmentOverride {
variable: String,
},
Explicit {
path: PathBuf,
},
}Expand description
How to choose the application root.
Does not hardcode product environment variables; callers pass the variable name.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PlatformDefault
Use platform-native application directories (dirs).
EnvironmentOverride
Prefer an environment variable when set and non-empty; else platform default.
Explicit
Use an explicit root path (expanded/normalized by the caller or this API).
Trait Implementations§
Source§impl Clone for AppRootPolicy
impl Clone for AppRootPolicy
Source§fn clone(&self) -> AppRootPolicy
fn clone(&self) -> AppRootPolicy
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 AppRootPolicy
impl Debug for AppRootPolicy
impl Eq for AppRootPolicy
Source§impl PartialEq for AppRootPolicy
impl PartialEq for AppRootPolicy
impl StructuralPartialEq for AppRootPolicy
Auto Trait Implementations§
impl Freeze for AppRootPolicy
impl RefUnwindSafe for AppRootPolicy
impl Send for AppRootPolicy
impl Sync for AppRootPolicy
impl Unpin for AppRootPolicy
impl UnsafeUnpin for AppRootPolicy
impl UnwindSafe for AppRootPolicy
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