pub struct FilePolicies {
pub files: HashMap<PathBuf, Policy>,
pub closed: Vec<PathBuf>,
}Expand description
The policies of extension files, so a policy applies whichever source of the same file loads it.
Fields§
§files: HashMap<PathBuf, Policy>The policy of each file of chest’s packages, by canonical path: what every entry that gives it allows.
closed: Vec<PathBuf>The canonical folders and files of entries chest left out, whose files run with no grant, whatever loads them.
Implementations§
Source§impl FilePolicies
impl FilePolicies
Sourcepub fn of(&self, file: &Path) -> Policy
pub fn of(&self, file: &Path) -> Policy
What extension file file, a canonical path, runs with: no grant
and no module but itself in an entry chest left out, else its
entries’ policy, and for a file chest does not know, every grant, as
packages from yapi install keep pi’s grants.
Sourcepub fn also_loaded(
&self,
file: &Path,
path: &str,
source: &str,
) -> Option<(String, String)>
pub fn also_loaded( &self, file: &Path, path: &str, source: &str, ) -> Option<(String, String)>
The warning for extension file file, a canonical path, that
source names by path though chest decides what it runs with, as
the path and message to show, or None when chest does not. Both are
escaped, since a cloned project’s file names can hold anything.