Struct matrix_sdk_crypto::backups::MegolmV1BackupKey
source · pub struct MegolmV1BackupKey { /* private fields */ }
Expand description
The public part of a backup key.
Implementations§
source§impl MegolmV1BackupKey
impl MegolmV1BackupKey
sourcepub fn backup_algorithm(&self) -> &str
pub fn backup_algorithm(&self) -> &str
Get the full name of the backup algorithm this backup key supports.
sourcepub fn signatures(&self) -> Signatures
pub fn signatures(&self) -> Signatures
Get all the signatures of this MegolmV1BackupKey
.
sourcepub fn from_base64(public_key: &str) -> Result<Self, DecodeError>
pub fn from_base64(public_key: &str) -> Result<Self, DecodeError>
Try to create a new MegolmV1BackupKey
from a base 64 encoded string.
sourcepub fn to_base64(&self) -> String
pub fn to_base64(&self) -> String
Convert the MegolmV1BackupKey
to a base 64 encoded string.
sourcepub fn backup_version(&self) -> Option<String>
pub fn backup_version(&self) -> Option<String>
Get the backup version that this key is used with, if any.
sourcepub fn set_version(&self, version: String)
pub fn set_version(&self, version: String)
Set the backup version that this MegolmV1BackupKey
will be used with.
The key won’t be able to encrypt room keys unless a version has been set.
Trait Implementations§
source§impl Clone for MegolmV1BackupKey
impl Clone for MegolmV1BackupKey
source§fn clone(&self) -> MegolmV1BackupKey
fn clone(&self) -> MegolmV1BackupKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for MegolmV1BackupKey
impl Send for MegolmV1BackupKey
impl Sync for MegolmV1BackupKey
impl Unpin for MegolmV1BackupKey
impl UnwindSafe for MegolmV1BackupKey
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