Struct vodozemac::olm::AccountPickle
source · [−]pub struct AccountPickle { /* private fields */ }
Expand description
A format suitable for serialization which implements serde::Serialize
and serde::Deserialize
. Obtainable by calling Account::pickle
.
Implementations
sourceimpl AccountPickle
impl AccountPickle
A format suitable for serialization which implements serde::Serialize
and serde::Deserialize
. Obtainable by calling Account::pickle
.
sourcepub fn encrypt(self, pickle_key: &[u8; 32]) -> String
pub fn encrypt(self, pickle_key: &[u8; 32]) -> String
Serialize and encrypt the pickle using the given key.
This is the inverse of AccountPickle::from_encrypted
.
sourcepub fn from_encrypted(
ciphertext: &str,
pickle_key: &[u8; 32]
) -> Result<Self, PickleError>
pub fn from_encrypted(
ciphertext: &str,
pickle_key: &[u8; 32]
) -> Result<Self, PickleError>
Obtain a pickle from a ciphertext by decrypting and deserializing using the given key.
This is the inverse of AccountPickle::encrypt
.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for AccountPickle
impl<'de> Deserialize<'de> for AccountPickle
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<AccountPickle> for Account
impl From<AccountPickle> for Account
sourcefn from(pickle: AccountPickle) -> Self
fn from(pickle: AccountPickle) -> Self
Converts to this type from the input type.
sourceimpl Serialize for AccountPickle
impl Serialize for AccountPickle
Auto Trait Implementations
impl RefUnwindSafe for AccountPickle
impl Send for AccountPickle
impl Sync for AccountPickle
impl Unpin for AccountPickle
impl UnwindSafe for AccountPickle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more