pub trait PathDenials: Send + Sync {
// Required methods
fn denial(
&self,
tool: &str,
cwd: &Path,
extra: &[PermissionRule],
) -> Option<PathDenial>;
fn denied_read_paths(
&self,
cwd: &Path,
extra: &[PermissionRule],
) -> Vec<PathBuf>;
}Expand description
Which paths a deny rule covers, for a tool that walks a directory on its own: a search is judged on the directory it starts in, so each file under it has to be judged as it is reached.
Required Methods§
Sourcefn denial(
&self,
tool: &str,
cwd: &Path,
extra: &[PermissionRule],
) -> Option<PathDenial>
fn denial( &self, tool: &str, cwd: &Path, extra: &[PermissionRule], ) -> Option<PathDenial>
The paths tool must leave out of its walk. extra is the rules a
delegation adds on top of the policy’s own. None when no rule
covers a path.
Sourcefn denied_read_paths(
&self,
cwd: &Path,
extra: &[PermissionRule],
) -> Vec<PathBuf>
fn denied_read_paths( &self, cwd: &Path, extra: &[PermissionRule], ) -> Vec<PathBuf>
The paths Read deny rules name outright, resolved from cwd as they
are judged there; a glob other than a trailing /** or /* names none.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".