pub struct LayeredConfig { /* private fields */ }Implementations§
Source§impl LayeredConfig
impl LayeredConfig
pub fn load(project_dir: Option<&Path>) -> Result<Self>
Sourcepub fn get_effective(&self, key: &str) -> Option<ConfigValue>
pub fn get_effective(&self, key: &str) -> Option<ConfigValue>
Returns the effective value for a dot-notation key, with source annotation. Priority: project > global (agent-level is handled by callers via manifest).
Sourcepub fn set(&self, key: &str, value: &str, scope: ConfigScope) -> Result<()>
pub fn set(&self, key: &str, value: &str, scope: ConfigScope) -> Result<()>
Persists value for key to the file indicated by scope.
Parses the existing file (if any), updates the key, and writes back.
Sourcepub fn merged(&self) -> HawkConfig
pub fn merged(&self) -> HawkConfig
Returns the merged HawkConfig (project layer overrides global defaults).
Auto Trait Implementations§
impl Freeze for LayeredConfig
impl RefUnwindSafe for LayeredConfig
impl Send for LayeredConfig
impl Sync for LayeredConfig
impl Unpin for LayeredConfig
impl UnsafeUnpin for LayeredConfig
impl UnwindSafe for LayeredConfig
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> 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