#[repr(u32)]pub enum Verb {
Install = 0,
Remove = 1,
Run = 2,
Build = 3,
Test = 4,
Update = 5,
Exec = 6,
}Expand description
pmpx 认可的动词。
封闭集合 —— 命令行上就这么多,封闭它比传字符串更能让编译器帮忙查漏。
编号与 abi 里的 VERB_* 常量一一对应,且顺序不许改(改了就要
abi::ABI_VERSION +1)。abi 模块里有测试钉住这件事。
Variants§
Install = 0
装依赖。无参 = 按锁文件装齐,带参 = 添加。
Remove = 1
卸依赖。
Run = 2
跑脚本 / 目标。
Build = 3
构建。
Test = 4
测试。
Update = 5
更新依赖。
Exec = 6
逃生舱:跑任意命令。见 PackageManager::command 里关于“不支持“的说明。
Implementations§
Trait Implementations§
impl Copy for Verb
impl Eq for Verb
Source§impl Ord for Verb
impl Ord for Verb
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Verb
impl PartialOrd for Verb
impl StructuralPartialEq for Verb
Auto Trait Implementations§
impl Freeze for Verb
impl RefUnwindSafe for Verb
impl Send for Verb
impl Sync for Verb
impl Unpin for Verb
impl UnsafeUnpin for Verb
impl UnwindSafe for Verb
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