#[repr(u8)]pub enum ExitCode {
Success = 0,
General = 1,
Usage = 2,
WrongPassword = 3,
Corrupted = 4,
UnsupportedVersion = 5,
MissingShard = 6,
Permission = 7,
Cancelled = 8,
}Expand description
CLI 退出码。数值定义见 docs/research/09-cli-design.md §3.1,
脚本依赖这些数值区分「密码错」与「文件坏」,不得随意改动。
Variants§
Success = 0
成功。
General = 1
一般错误。
Usage = 2
参数错误。
WrongPassword = 3
密码错误或无匹配 slot。
Corrupted = 4
文件损坏或被篡改(MAC / AEAD 校验失败)。
UnsupportedVersion = 5
格式版本不支持。
MissingShard = 6
缺少分片。
Permission = 7
权限不足。
Cancelled = 8
用户取消。
Trait Implementations§
impl Copy for ExitCode
impl Eq for ExitCode
impl StructuralPartialEq for ExitCode
Auto Trait Implementations§
impl Forget for ExitCode
impl Freeze for ExitCode
impl RefUnwindSafe for ExitCode
impl Send for ExitCode
impl Sync for ExitCode
impl Unpin for ExitCode
impl UnsafeUnpin for ExitCode
impl UnwindSafe for ExitCode
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