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