Skip to main content

WriteScope

Trait WriteScope 

Source
pub trait WriteScope:
    Send
    + Sync
    + Debug {
    // Required methods
    fn covers(&self, path: &str, cwd: &Path) -> bool;
    fn grants(&self) -> Vec<PermissionRule>;
    fn fixed_prefixes_within(&self, root: &Path) -> Vec<PathBuf>;
}
Expand description

The files one run may write.

Required Methods§

Source

fn covers(&self, path: &str, cwd: &Path) -> bool

Whether writing path, as a tool resolves it from cwd, stays inside.

Source

fn grants(&self) -> Vec<PermissionRule>

An Edit(...) allow per glob: what a delegated grant takes.

Source

fn fixed_prefixes_within(&self, root: &Path) -> Vec<PathBuf>

The directories the globs lie under, each inside root.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§