Skip to main content

TreeReport

Struct TreeReport 

Source
pub struct TreeReport {
    pub root: PathBuf,
    pub files: usize,
    pub dirs: usize,
    pub long_names: usize,
    pub skipped: Vec<SkippedEntry>,
}
Expand description

树形模式加密的结果。

Fields§

§root: PathBuf

加密后的根目录(磁盘路径,名字已加密)。

§files: usize

成功加密的文件数。

§dirs: usize

创建的目录数。

§long_names: usize

需要边车文件才能还原的超长目录名数量。

单独报出来是因为它有运维含义:这些目录一旦丢了 .omy-name 就再也认不出原名,用户可能想缩短目录层级重来一次。

§skipped: Vec<SkippedEntry>

被跳过的条目,需如实展示。

Implementations§

Source§

impl TreeReport

Source

pub const fn leak_notice() -> &'static str

树形模式泄露元数据的统一告知文案(N6)。

放在 core 而不是各前端:CLI 与 GUI 说法不一致会让人以为是两种不同的 行为。措辞刻意具体——「泄露元数据」这种说法用户无法据此判断风险, 「别人能数出你有多少文件」才能。

Trait Implementations§

Source§

impl Debug for TreeReport

Source§

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

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

impl Default for TreeReport

Source§

fn default() -> Self

Returns the “default value” for a type. 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.