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§
Sourcefn covers(&self, path: &str, cwd: &Path) -> bool
fn covers(&self, path: &str, cwd: &Path) -> bool
Whether writing path, as a tool resolves it from cwd, stays inside.
Sourcefn grants(&self) -> Vec<PermissionRule>
fn grants(&self) -> Vec<PermissionRule>
An Edit(...) allow per glob: what a delegated grant takes.
Sourcefn fixed_prefixes_within(&self, root: &Path) -> Vec<PathBuf>
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".