pub struct SecretFileWrite { /* private fields */ }Expand description
A checked, not yet performed, write of a secret file: see
plan_secret_file_write.
Implementations§
Source§impl SecretFileWrite
impl SecretFileWrite
Sourcepub fn replaces_existing(&self) -> bool
pub fn replaces_existing(&self) -> bool
Whether this write replaces a file that exists (with another value).
Sourcepub fn write(self, secret: &Secret) -> Result<(), SecretEnvError>
pub fn write(self, secret: &Secret) -> Result<(), SecretEnvError>
Writes secret (plus a trailing newline) atomically: a 0600 temp
file with a unique name is created beside the target, synced, and
renamed over it. A failed write leaves no temp file behind.
§Errors
SecretEnvError::Unwritable when the file can’t be written.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SecretFileWrite
impl RefUnwindSafe for SecretFileWrite
impl Send for SecretFileWrite
impl Sync for SecretFileWrite
impl Unpin for SecretFileWrite
impl UnsafeUnpin for SecretFileWrite
impl UnwindSafe for SecretFileWrite
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more