Skip to main content

UnsupportedKind

Enum UnsupportedKind 

Source
pub enum UnsupportedKind {
    Mode,
    Btime,
    Owner,
    Xattr,
    Symlink,
}
Expand description

一项元数据未能还原的原因。

用枚举而不是字符串:这些值要进 JSON 契约、要做翻译键, 字符串散落在各处迟早写错一个,而拼错的键在界面上显示为原文, 没有任何测试会因此变红。

Variants§

§

Mode

POSIX 权限位(Windows 无此概念)。

§

Btime

创建时间(Linux 无法设置)。

§

Owner

属主 uid / gid(跨机器无意义,有意不还原)。

§

Xattr

扩展属性。

符号链接(当前平台不允许创建)。

Windows 上创建符号链接需要 SeCreateSymbolicLinkPrivilege,普通 账号未开开发者模式时必然失败(实测报「需要管理员权限」)。这属于 环境的既有事实而不是这次操作出错,所以归 unsupported:报成 failure 会让人反复重试一件不可能成功的事。链接目标仍完整保存在加密文件里, 换台机器或开了开发者模式就能还原。

Implementations§

Source§

impl UnsupportedKind

Source

pub const fn code(self) -> &'static str

稳定的字符串代号。

改动即破坏契约:这些值同时是 --json 输出的字段值和前端的 翻译键后缀。

Trait Implementations§

Source§

impl Clone for UnsupportedKind

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for UnsupportedKind

Source§

impl Debug for UnsupportedKind

Source§

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

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

impl Eq for UnsupportedKind

Source§

impl PartialEq for UnsupportedKind

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for UnsupportedKind

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.