pub struct GroupSessionPickle { /* private fields */ }
Expand description
A format suitable for serialization which implements serde::Serialize
and serde::Deserialize
. Obtainable by calling GroupSession::pickle
.
Implementations§
Source§impl GroupSessionPickle
impl GroupSessionPickle
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 GroupSessionPickle::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 GroupSessionPickle::encrypt
.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GroupSessionPickle
impl<'de> Deserialize<'de> for GroupSessionPickle
Source§fn 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
Source§impl From<GroupSessionPickle> for GroupSession
impl From<GroupSessionPickle> for GroupSession
Source§fn from(pickle: GroupSessionPickle) -> Self
fn from(pickle: GroupSessionPickle) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GroupSessionPickle
impl RefUnwindSafe for GroupSessionPickle
impl Send for GroupSessionPickle
impl Sync for GroupSessionPickle
impl Unpin for GroupSessionPickle
impl UnwindSafe for GroupSessionPickle
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