pub enum PicklingMode {
Unencrypted,
Encrypted {
key: Vec<u8>,
},
}
Expand description
Used for setting the encryption parameter for pickling (serialisation) functions.
Unencrypted
is functionally equivalent to Encrypted{key: [].to_vec() }
, but is much more clear.
Pickling modes have to be equivalent for pickling and unpickling operations to succeed.
Encrypted
takes ownership of key
, in order to properly destroy it after use.
Variants§
Auto Trait Implementations§
impl Freeze for PicklingMode
impl RefUnwindSafe for PicklingMode
impl Send for PicklingMode
impl Sync for PicklingMode
impl Unpin for PicklingMode
impl UnwindSafe for PicklingMode
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