pub struct PermissionsSnapshot { /* private fields */ }Expand description
A parsed, read-only view of the active sibling permissions.toml.
Removal tokens bind a displayed rule index to the exact file bytes that produced this snapshot. A later editor must present the rule again when another process changed the file instead of deleting whichever rule moved into the old index.
Implementations§
Source§impl PermissionsSnapshot
impl PermissionsSnapshot
pub fn path(&self) -> &Path
pub fn file_exists(&self) -> bool
pub fn file_state(&self) -> PermissionsFileState
pub fn permissions(&self) -> &PermissionsToml
pub fn rules(&self) -> &[ToolAskRule]
Sourcepub fn removal_token(&self, index: usize) -> Option<&str>
pub fn removal_token(&self, index: usize) -> Option<&str>
Return the opaque confirmation token for a zero-based rule index.
Trait Implementations§
Source§impl Clone for PermissionsSnapshot
impl Clone for PermissionsSnapshot
Source§fn clone(&self) -> PermissionsSnapshot
fn clone(&self) -> PermissionsSnapshot
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 moreSource§impl Debug for PermissionsSnapshot
impl Debug for PermissionsSnapshot
impl Eq for PermissionsSnapshot
Source§impl PartialEq for PermissionsSnapshot
impl PartialEq for PermissionsSnapshot
impl StructuralPartialEq for PermissionsSnapshot
Auto Trait Implementations§
impl Freeze for PermissionsSnapshot
impl RefUnwindSafe for PermissionsSnapshot
impl Send for PermissionsSnapshot
impl Sync for PermissionsSnapshot
impl Unpin for PermissionsSnapshot
impl UnsafeUnpin for PermissionsSnapshot
impl UnwindSafe for PermissionsSnapshot
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.