pub enum PermissionUpdate {
AddRules {
rules: Vec<PermissionRuleValue>,
behavior: PermissionBehavior,
destination: Option<PermissionUpdateDestination>,
},
ReplaceRules {
rules: Vec<PermissionRuleValue>,
behavior: PermissionBehavior,
destination: Option<PermissionUpdateDestination>,
},
RemoveRules {
rules: Vec<PermissionRuleValue>,
behavior: PermissionBehavior,
destination: Option<PermissionUpdateDestination>,
},
SetMode {
mode: PermissionMode,
destination: Option<PermissionUpdateDestination>,
},
AddDirectories {
directories: Vec<String>,
destination: Option<PermissionUpdateDestination>,
},
RemoveDirectories {
directories: Vec<String>,
destination: Option<PermissionUpdateDestination>,
},
}Expand description
One permission-state mutation attached to an allow decision. Mirrors
the CLI’s PermissionUpdate. Dispatched on type.
Variants§
AddRules
Append rules to the active permission set.
Fields
§
rules: Vec<PermissionRuleValue>Rules to add.
§
behavior: PermissionBehaviorPolicy for matching invocations.
§
destination: Option<PermissionUpdateDestination>Where to persist. None = in-memory only.
ReplaceRules
Replace the entire rule set with rules.
Fields
§
rules: Vec<PermissionRuleValue>Rules to install.
§
behavior: PermissionBehaviorPolicy for matching invocations.
§
destination: Option<PermissionUpdateDestination>Where to persist.
RemoveRules
Remove the listed rules from the active set.
Fields
§
rules: Vec<PermissionRuleValue>Rules to drop.
§
behavior: PermissionBehaviorPolicy the rules were registered under.
§
destination: Option<PermissionUpdateDestination>Where to persist the removal.
SetMode
Switch the session’s PermissionMode.
Fields
§
mode: PermissionModeTarget mode.
§
destination: Option<PermissionUpdateDestination>Where to persist.
AddDirectories
Widen the additional-directories allowlist.
Fields
§
destination: Option<PermissionUpdateDestination>Where to persist.
RemoveDirectories
Shrink the additional-directories allowlist.
Trait Implementations§
Source§impl Clone for PermissionUpdate
impl Clone for PermissionUpdate
Source§impl Debug for PermissionUpdate
impl Debug for PermissionUpdate
Source§impl<'de> Deserialize<'de> for PermissionUpdate
impl<'de> Deserialize<'de> for PermissionUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PermissionUpdate
Source§impl PartialEq for PermissionUpdate
impl PartialEq for PermissionUpdate
Source§impl Serialize for PermissionUpdate
impl Serialize for PermissionUpdate
impl StructuralPartialEq for PermissionUpdate
Auto Trait Implementations§
impl Freeze for PermissionUpdate
impl RefUnwindSafe for PermissionUpdate
impl Send for PermissionUpdate
impl Sync for PermissionUpdate
impl Unpin for PermissionUpdate
impl UnsafeUnpin for PermissionUpdate
impl UnwindSafe for PermissionUpdate
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.