pub enum Profile {
Dev,
Prod,
Test,
Custom,
}Expand description
Predefined configuration profiles.
Variants§
Dev
Development mode: verbose logging, relaxed settings.
Prod
Production mode: minimal logging, strict settings.
Test
Testing mode: mock SSH enabled, test fixtures.
Custom
Custom profile loaded from file.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn from_string(s: &str) -> Self
pub fn from_string(s: &str) -> Self
Parse a profile from a string.
Sourcepub fn get_defaults(&self) -> Vec<(&'static str, &'static str)>
pub fn get_defaults(&self) -> Vec<(&'static str, &'static str)>
Get profile defaults as key-value pairs.
Returns environment variable defaults for this profile. Only returns variables that are NOT already set in the environment. The caller is responsible for actually setting them if desired.
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Get profile-specific description.
Sourcepub fn uses_mock_ssh(&self) -> bool
pub fn uses_mock_ssh(&self) -> bool
Check if this profile enables mock SSH by default.
Sourcepub fn is_verbose(&self) -> bool
pub fn is_verbose(&self) -> bool
Check if this profile enables verbose logging by default.
Trait Implementations§
impl Copy for Profile
impl Eq for Profile
impl StructuralPartialEq for Profile
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.