pub enum SlotPlan {
Keep,
Write(Kek),
Clear,
}Expand description
可管理模式下,一个槽位要怎么处理。
不 derive Clone:Kek 刻意没有 Clone(密钥不该被随手复制),调用方
按引用传这个切片即可。
Variants§
Keep
保留这个槽位的原有字节。
原样搬运,不需要知道它属于谁——「保住某个槽」与「知道某个槽是 什么」是两件事,前者不需要后者。
Write(Kek)
把这个槽位换成给定的 KEK。
Clear
清空这个槽位(填随机,目录里应相应记成 Empty)。
Trait Implementations§
Auto Trait Implementations§
impl Forget for SlotPlan
impl Freeze for SlotPlan
impl RefUnwindSafe for SlotPlan
impl Send for SlotPlan
impl Sync for SlotPlan
impl Unpin for SlotPlan
impl UnsafeUnpin for SlotPlan
impl UnwindSafe for SlotPlan
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