pub struct RekeyParams<'a> {
pub vault_salt: &'a [u8; 16],
pub cipher: CipherId,
pub rotate: bool,
pub others: OtherSlots,
}Expand description
改写整棵树的钥匙时要一起传的那几项。
打成结构体而不是继续加形参:到第 8 个参数时,调用点已经是一串 &salt, cipher, false, Carry, None —— 读的人根本分不出谁是谁, 而把 rotate 和 others 的位置写反不会编译报错,只会静默改变语义。
Fields§
§vault_salt: &'a [u8; 16]vault 级 salt。
cipher: CipherIdAEAD 算法。
rotate: bool是否连载荷一起重写(轮换文件密钥)。
others: OtherSlots认不出来的槽位怎么处理:只有 remove 该用 Discard。
Trait Implementations§
Source§impl<'a> Clone for RekeyParams<'a>
impl<'a> Clone for RekeyParams<'a>
impl<'a> Copy for RekeyParams<'a>
Auto Trait Implementations§
impl<'a> Forget for RekeyParams<'a>
impl<'a> Freeze for RekeyParams<'a>
impl<'a> RefUnwindSafe for RekeyParams<'a>
impl<'a> Send for RekeyParams<'a>
impl<'a> Sync for RekeyParams<'a>
impl<'a> Unpin for RekeyParams<'a>
impl<'a> UnsafeUnpin for RekeyParams<'a>
impl<'a> UnwindSafe for RekeyParams<'a>
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