Skip to main content

Warning

Struct Warning 

Source
pub struct Warning {
    pub key_id: [u8; 8],
    pub key_path: PathBuf,
    pub declared: usize,
    pub still_open: usize,
    pub sweeping: Vec<PathBuf>,
}
Expand description

Everything lock says before it does anything irreversible.

A value rather than a printed string so the same text reaches the user in both modes, and so a test can assert on it without capturing a stream. It names the key by fingerprint and never by material: printing the key here was considered and rejected — it would survive in scrollback, in a terminal multiplexer’s buffer, in a CI log, and in the working tree the moment someone redirects this command’s output.

Fields§

§key_id: [u8; 8]

Fingerprint of the key about to be deleted.

§key_path: PathBuf

Where that key lives.

§declared: usize

How many working-tree files the declaration selects.

§still_open: usize

How many of those are still plaintext, so will actually change.

§sweeping: Vec<PathBuf>

Temporary files this run will delete.

Named here rather than only in the closing report, because deleting an untracked file is irreversible and disclosing it afterwards is too late to be a disclosure.

Trait Implementations§

Source§

impl Debug for Warning

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Warning

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.