pub struct ConfigStore { /* private fields */ }Expand description
A singleton ConfigStore for structured configurations
This is a thread-safe store that mirrors the Python ConfigStore. It uses RwLock for safe concurrent access.
Implementations§
Source§impl ConfigStore
impl ConfigStore
Sourcepub fn store(
&self,
name: &str,
node: ConfigDict,
group: Option<&str>,
package: Option<&str>,
provider: Option<&str>,
)
pub fn store( &self, name: &str, node: ConfigDict, group: Option<&str>, package: Option<&str>, provider: Option<&str>, )
Store a config node
§Arguments
name- Config name (without .yaml extension)node- The config datagroup- Optional group path (e.g., “db” or “hydra/launcher”)package- Optional package path (e.g., “db”)provider- Optional provider name
Sourcepub fn load(&self, config_path: &str) -> Option<ConfigNode>
pub fn load(&self, config_path: &str) -> Option<ConfigNode>
Sourcepub fn get_type(&self, path: &str) -> ObjectType
pub fn get_type(&self, path: &str) -> ObjectType
Get the type of a path (group or config)
Sourcepub fn config_exists(&self, config_path: &str) -> bool
pub fn config_exists(&self, config_path: &str) -> bool
Check if a config exists
Sourcepub fn group_exists(&self, group_path: &str) -> bool
pub fn group_exists(&self, group_path: &str) -> bool
Check if a group exists
Trait Implementations§
Source§impl Debug for ConfigStore
impl Debug for ConfigStore
Auto Trait Implementations§
impl !Freeze for ConfigStore
impl RefUnwindSafe for ConfigStore
impl Send for ConfigStore
impl Sync for ConfigStore
impl Unpin for ConfigStore
impl UnsafeUnpin for ConfigStore
impl UnwindSafe for ConfigStore
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