Skip to main content

PackedFolder

Struct PackedFolder 

Source
pub struct PackedFolder {
    pub payload: Vec<u8>,
    pub index: ContainerIndex,
    pub root_name: String,
    pub file_count: usize,
    pub dir_count: usize,
    pub link_count: usize,
    pub skipped: Vec<SkippedEntry>,
}
Expand description

打包结果。

Fields§

§payload: Vec<u8>

拼接后的明文载荷。

§index: ContainerIndex

容器索引。

§root_name: String

根目录名,用作加密后的显示名。

§file_count: usize

文件数。

§dir_count: usize

目录数。

§link_count: usize

符号链接数。

单独计数而不是并进 file_count:还原时链接可能因平台限制建不出来 (Windows 无特权就必然失败),报告要能说清「10 个文件都好了,2 个 链接没能还原」。混在一起就只能说「12 项里有 2 项有问题」。

§skipped: Vec<SkippedEntry>

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

Trait Implementations§

Source§

impl Debug for PackedFolder

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, 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.