pub struct ConfigStore {
pub config: ConfigToml,
/* private fields */
}Fields§
§config: ConfigTomlImplementations§
Source§impl ConfigStore
impl ConfigStore
pub fn load(path: Option<PathBuf>) -> Result<Self>
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