INNER CODE UNIT · Rust
share_exporter
jub0t/Concat · src/crates/concat-api/src/lib.rs:213
pub fn share_exporter(&mut self, exporter: Exporter) {
self.exporter = exporter;
}
/// Takes an embedder's register of open projects in place of its own,
/// so a folder the window has open is refused here, and the other way
/// round.
pub fn share_open_projects(&mut self, open: OpenProjects) {
self.open = open;
}
/// Confines every write to `roots`: from here on a created project, an
/// instantiated template, an export and a preview file must land under
/// one of them, and any other path is `refused`. Reads - a probe, a
/// project opened by path - are not confined. An empty list confines
/// nothing, which is right for the process's own owner at a terminal
/// and wrong for a socket.
pub fn restrict_writes_to(&mut self, roots: Vec<PathBuf>) {