pub struct SecretFile;Expand description
Write secret data with platform-appropriate restrictive permissions.
Unix: creates with mode 0o600 (owner rw only) — no world-readable window. Windows: applies per-user DACL via icacls (inheritance disabled, owner-only). %APPDATA% already restricts to the user by default, so the icacls call is defense-in-depth matching chmod 0600 semantics.
Upgrade note: the Windows path uses icacls for pragmatic zero-dependency
delivery. A future iteration should switch to SetNamedSecurityInfoW via
the windows crate for a locale-safe, shell-free API call.
Implementations§
Auto Trait Implementations§
impl Freeze for SecretFile
impl RefUnwindSafe for SecretFile
impl Send for SecretFile
impl Sync for SecretFile
impl Unpin for SecretFile
impl UnsafeUnpin for SecretFile
impl UnwindSafe for SecretFile
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