pub struct ConfigStore {
pub config: ConfigToml,
/* private fields */
}Fields§
§config: ConfigTomlImplementations§
Source§impl ConfigStore
impl ConfigStore
pub fn load(path: Option<PathBuf>) -> Result<Self>
Sourcepub fn rendered_body(&self) -> Result<String>
pub fn rendered_body(&self) -> Result<String>
Render the exact body save would write: the serialized
config with comments and disabled keys from the originally-loaded file
merged back in. Exposed so setup flows can stage this body into a
persistence::SetupTransaction alongside sibling files and keep the
comment-preserving write atomic with the rest of the transaction.
pub fn save(&self) -> Result<()>
pub fn path(&self) -> &Path
pub fn permissions(&self) -> &PermissionsToml
pub fn permissions_path(&self) -> PathBuf
pub fn exec_policy_engine(&self) -> ExecPolicyEngine
Sourcepub fn append_ask_rules(&mut self, rules: &[ToolAskRule]) -> Result<usize>
pub fn append_ask_rules(&mut self, rules: &[ToolAskRule]) -> Result<usize>
Atomically append ask-only permission rules to the sibling
permissions.toml file.
Existing comments and formatting are preserved. Exact duplicate rules are ignored, and the in-memory permissions snapshot is refreshed after a successful write.
Trait Implementations§
Source§impl Clone for ConfigStore
impl Clone for ConfigStore
Source§fn clone(&self) -> ConfigStore
fn clone(&self) -> ConfigStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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