Struct vodozemac::megolm::ExportedSessionKey  
source · [−]pub struct ExportedSessionKey { /* private fields */ }Expand description
The exported session key.
This uses the same format as the SessionKey minus the signature at the
end.
Implementations
sourceimpl ExportedSessionKey
 
impl ExportedSessionKey
sourcepub fn to_bytes(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator, 
 
pub fn to_bytes(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator, 
A: Allocator,
Serialize the ExportedSessionKey to a byte vector.
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, SessionKeyDecodeError>
 
pub fn from_bytes(bytes: &[u8]) -> Result<Self, SessionKeyDecodeError>
Deserialize the ExportedSessionKey from a byte slice.
sourcepub fn to_base64(&self) -> String
 
pub fn to_base64(&self) -> String
Serialize the ExportedSessionKey to a base64 encoded string.
This method will first use the ExportedSessionKey::to_bytes() to
convert the session key to a byte vector and then encode the byte vector
to a string using unpadded base64 as the encoding.
sourcepub fn from_base64(key: &str) -> Result<Self, SessionKeyDecodeError>
 
pub fn from_base64(key: &str) -> Result<Self, SessionKeyDecodeError>
Deserialize the ExportedSessionKey from base64 encoded string.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ExportedSessionKey
 
impl<'de> Deserialize<'de> for ExportedSessionKey
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 Drop for ExportedSessionKey
 
impl Drop for ExportedSessionKey
sourceimpl Serialize for ExportedSessionKey
 
impl Serialize for ExportedSessionKey
sourceimpl TryFrom<&[u8]> for ExportedSessionKey
 
impl TryFrom<&[u8]> for ExportedSessionKey
sourceimpl TryFrom<&str> for ExportedSessionKey
 
impl TryFrom<&str> for ExportedSessionKey
Auto Trait Implementations
impl RefUnwindSafe for ExportedSessionKey
impl Send for ExportedSessionKey
impl Sync for ExportedSessionKey
impl Unpin for ExportedSessionKey
impl UnwindSafe for ExportedSessionKey
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