pub struct DaemonPaths { /* private fields */ }Expand description
How the daemon classifies paths: the SDK’s patterns, its own config and env files (fixed at startup), and any env file its environment names.
The default protects no daemon files; only tests use it.
Implementations§
Source§impl DaemonPaths
impl DaemonPaths
Sourcepub fn new(protected: Vec<PathBuf>) -> Self
pub fn new(protected: Vec<PathBuf>) -> Self
protected holds the daemon’s own config and env files. They change
only through manage_config, never through the file tools.
Sourcepub fn is_secret(&self, path: &Path) -> bool
pub fn is_secret(&self, path: &Path) -> bool
True for files that hold secrets (keys, credentials, env files, the
daemon’s own config). Used by read_file.
Sourcepub fn is_secret_ignoring_name_shape(&self, path: &Path) -> bool
pub fn is_secret_ignoring_name_shape(&self, path: &Path) -> bool
Like DaemonPaths::is_secret but without the .env.* / *.key
name-shape rules, so a template file is judged by where it lives alone.
Sourcepub fn is_sensitive(&self, path: &Path) -> bool
pub fn is_sensitive(&self, path: &Path) -> bool
True for paths the file tools must not write.
Sourcepub fn is_own_file(&self, path: &Path) -> bool
pub fn is_own_file(&self, path: &Path) -> bool
True for the daemon’s own config and env files given at startup.
Trait Implementations§
Source§impl Clone for DaemonPaths
impl Clone for DaemonPaths
Source§impl Debug for DaemonPaths
impl Debug for DaemonPaths
Auto Trait Implementations§
impl Forget for DaemonPaths
impl Freeze for DaemonPaths
impl Move for DaemonPaths
impl RefUnwindSafe for DaemonPaths
impl Send for DaemonPaths
impl Sync for DaemonPaths
impl Unpin for DaemonPaths
impl UnsafeUnpin for DaemonPaths
impl UnwindSafe for DaemonPaths
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more