pub enum UnsupportedKind {
Mode,
Btime,
Owner,
Xattr,
Symlink,
}Expand description
一项元数据未能还原的原因。
用枚举而不是字符串:这些值要进 JSON 契约、要做翻译键, 字符串散落在各处迟早写错一个,而拼错的键在界面上显示为原文, 没有任何测试会因此变红。
Variants§
Mode
POSIX 权限位(Windows 无此概念)。
Btime
创建时间(Linux 无法设置)。
Owner
属主 uid / gid(跨机器无意义,有意不还原)。
Xattr
扩展属性。
Symlink
符号链接(当前平台不允许创建)。
Windows 上创建符号链接需要 SeCreateSymbolicLinkPrivilege,普通
账号未开开发者模式时必然失败(实测报「需要管理员权限」)。这属于
环境的既有事实而不是这次操作出错,所以归 unsupported:报成 failure
会让人反复重试一件不可能成功的事。链接目标仍完整保存在加密文件里,
换台机器或开了开发者模式就能还原。
Implementations§
Trait Implementations§
Source§impl Clone for UnsupportedKind
impl Clone for UnsupportedKind
impl Copy for UnsupportedKind
Source§impl Debug for UnsupportedKind
impl Debug for UnsupportedKind
impl Eq for UnsupportedKind
Source§impl PartialEq for UnsupportedKind
impl PartialEq for UnsupportedKind
impl StructuralPartialEq for UnsupportedKind
Auto Trait Implementations§
impl Forget for UnsupportedKind
impl Freeze for UnsupportedKind
impl RefUnwindSafe for UnsupportedKind
impl Send for UnsupportedKind
impl Sync for UnsupportedKind
impl Unpin for UnsupportedKind
impl UnsafeUnpin for UnsupportedKind
impl UnwindSafe for UnsupportedKind
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