pub struct RealConfigEnvironment;Expand description
Production implementation of ConfigEnvironment.
Uses real environment variables and filesystem operations:
- Reads
XDG_CONFIG_HOMEfor config path resolution - Uses
std::fsfor all file operations
Trait Implementations§
Source§impl Clone for RealConfigEnvironment
impl Clone for RealConfigEnvironment
Source§fn clone(&self) -> RealConfigEnvironment
fn clone(&self) -> RealConfigEnvironment
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 ConfigEnvironment for RealConfigEnvironment
impl ConfigEnvironment for RealConfigEnvironment
Source§fn unified_config_path(&self) -> Option<PathBuf>
fn unified_config_path(&self) -> Option<PathBuf>
Get the path to the unified config file. Read more
Source§fn file_exists(&self, path: &Path) -> bool
fn file_exists(&self, path: &Path) -> bool
Check if a file exists at the given path.
Source§fn write_file(&self, path: &Path, content: &str) -> Result<()>
fn write_file(&self, path: &Path, content: &str) -> Result<()>
Write content to a file, creating parent directories if needed.
Source§fn prompt_path(&self) -> PathBuf
fn prompt_path(&self) -> PathBuf
Get the path to the PROMPT.md file. Read more
Source§impl Debug for RealConfigEnvironment
impl Debug for RealConfigEnvironment
Source§impl Default for RealConfigEnvironment
impl Default for RealConfigEnvironment
Source§fn default() -> RealConfigEnvironment
fn default() -> RealConfigEnvironment
Returns the “default value” for a type. Read more
impl Copy for RealConfigEnvironment
Auto Trait Implementations§
impl Freeze for RealConfigEnvironment
impl RefUnwindSafe for RealConfigEnvironment
impl Send for RealConfigEnvironment
impl Sync for RealConfigEnvironment
impl Unpin for RealConfigEnvironment
impl UnwindSafe for RealConfigEnvironment
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more