pub enum ConfigTier {
System = 1,
Local = 2,
User = 3,
}Expand description
Configuration tier represents the priority level of a configuration source.
Tiers are ordered by priority: User > Local > System. When merging configurations, User tier overrides Local, and Local overrides System.
The enum’s discriminant values directly represent priority levels,
allowing use via u8::from(tier) or tier as u8.
Variants§
System = 1
System-wide configuration.
Lowest priority, typically in /etc/.
Examples: /etc/app/, /etc/xdg/app/
Local = 2
Local/machine-specific configuration.
Medium priority, typically in /usr/local/etc or similar.
Examples: /usr/local/etc/app/, /opt/app/etc/
User = 3
User-specific configuration.
Highest priority, typically in user’s home directory.
Examples: ~/.config/app/, ~/.apprc
Implementations§
Trait Implementations§
Source§impl Clone for ConfigTier
impl Clone for ConfigTier
Source§fn clone(&self) -> ConfigTier
fn clone(&self) -> ConfigTier
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 moreSource§impl Debug for ConfigTier
impl Debug for ConfigTier
Source§impl Default for ConfigTier
impl Default for ConfigTier
Source§fn default() -> ConfigTier
fn default() -> ConfigTier
Returns the “default value” for a type. Read more
Source§impl From<ConfigTier> for u8
impl From<ConfigTier> for u8
Source§fn from(tier: ConfigTier) -> Self
fn from(tier: ConfigTier) -> Self
Converts to this type from the input type.
Source§impl Hash for ConfigTier
impl Hash for ConfigTier
Source§impl Ord for ConfigTier
impl Ord for ConfigTier
Source§fn cmp(&self, other: &ConfigTier) -> Ordering
fn cmp(&self, other: &ConfigTier) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ConfigTier
impl PartialEq for ConfigTier
Source§impl PartialOrd for ConfigTier
impl PartialOrd for ConfigTier
impl Copy for ConfigTier
impl Eq for ConfigTier
impl StructuralPartialEq for ConfigTier
Auto Trait Implementations§
impl Freeze for ConfigTier
impl RefUnwindSafe for ConfigTier
impl Send for ConfigTier
impl Sync for ConfigTier
impl Unpin for ConfigTier
impl UnsafeUnpin for ConfigTier
impl UnwindSafe for ConfigTier
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