pub enum FolderLevel {
Reads,
Developer,
Workspace,
}Expand description
How far writes are approved when the folder is unknown. A second dial beside --level: a
command passes when it passes both, and this one never loosens what --level refuses.
Variants§
Reads
Reads only; every write goes to the harness’s prompt.
Developer
What a developer approves in a known project, except deletion and paths that climb out.
Workspace
The folder is treated as the workspace: deletion and ../sibling paths too.
Implementations§
Source§impl FolderLevel
impl FolderLevel
pub const DEFAULT: FolderLevel = FolderLevel::Developer
pub const NAMES: [&'static str; 3]
pub fn parse(name: &str) -> Option<FolderLevel>
pub fn name(self) -> &'static str
Sourcepub fn admits_implicit(self, anchor: Anchor) -> bool
pub fn admits_implicit(self, anchor: Anchor) -> bool
Whether a write the command makes without naming a path is approved at this level.
Trait Implementations§
Source§impl Clone for FolderLevel
impl Clone for FolderLevel
impl Copy for FolderLevel
Source§impl Debug for FolderLevel
impl Debug for FolderLevel
impl Eq for FolderLevel
Source§impl Ord for FolderLevel
impl Ord for FolderLevel
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for FolderLevel
impl PartialEq for FolderLevel
Source§impl PartialOrd for FolderLevel
impl PartialOrd for FolderLevel
impl StructuralPartialEq for FolderLevel
Auto Trait Implementations§
impl Freeze for FolderLevel
impl RefUnwindSafe for FolderLevel
impl Send for FolderLevel
impl Sync for FolderLevel
impl Unpin for FolderLevel
impl UnsafeUnpin for FolderLevel
impl UnwindSafe for FolderLevel
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.