pub struct CryptoClient { /* private fields */ }Implementations§
Source§impl CryptoClient
impl CryptoClient
pub fn new(engine: CryptoEngine) -> Self
pub fn with_client(self, client: MatrixClient) -> Self
pub async fn set_device_id(&self, device_id: impl Into<String>)
pub async fn device_id(&self) -> Option<String>
pub async fn client_device_id(&self) -> Option<String>
pub async fn client_device_ed25519(&self) -> Option<String>
pub async fn client_device_curve25519(&self) -> Option<String>
pub async fn is_ready(&self) -> bool
pub async fn prepare(&self) -> Result<()>
pub async fn encrypt_message( &self, _room_id: &str, plaintext: &str, ) -> Result<String>
pub async fn decrypt_message( &self, _room_id: &str, ciphertext: &Value, ) -> Result<Value>
pub async fn is_room_encrypted(&self, room_id: &str) -> Result<bool>
pub async fn get_encryption_info( &self, room_id: &str, ) -> Result<Option<EncryptionInfo>>
pub async fn on_room_event(&self, room_id: &str, event: &Value) -> Result<()>
pub async fn on_room_join(&self, room_id: &str) -> Result<()>
pub async fn mark_room_encrypted(&self, room_id: &str, encrypted: bool)
pub async fn trust_device(&self, _user_id: &str, _device_id: &str) -> Result<()>
pub async fn untrust_device( &self, _user_id: &str, _device_id: &str, ) -> Result<()>
pub async fn get_user_devices(&self, user_id: &str) -> Result<Vec<DeviceInfo>>
pub async fn has_unverified_devices(&self, room_id: &str) -> Result<bool>
pub async fn export_room_keys(&self, _passphrase: &str) -> Result<Vec<u8>>
pub async fn import_room_keys( &self, _encrypted_keys: &[u8], _passphrase: &str, ) -> Result<RoomKeyImportResult>
pub async fn export_room_keys_for_session( &self, room_id: &str, session_id: &str, ) -> Result<Vec<String>>
pub async fn update_sync_data( &self, _to_device_messages: &[Value], _otk_counts: &Value, _unused_fallback_key_algs: &[String], _changed_device_lists: &[String], _left_device_lists: &[String], ) -> Result<()>
pub async fn sign(&self, obj: &Value) -> Result<Value>
pub async fn encrypt_room_event( &self, room_id: &str, event_type: &str, content: &Value, ) -> Result<EncryptedRoomEvent>
pub async fn decrypt_room_event( &self, event: &EncryptedRoomEvent, room_id: &str, ) -> Result<RoomEvent>
pub async fn encrypt_media( &self, file: &[u8], ) -> Result<(Vec<u8>, EncryptedFile)>
pub async fn decrypt_media_bytes( &self, file: &EncryptedFile, encrypted: &[u8], ) -> Result<Vec<u8>>
pub async fn decrypt_media(&self, file: &EncryptedFile) -> Result<Vec<u8>>
pub async fn enable_key_backup(&self, _info: &Value) -> Result<()>
pub async fn disable_key_backup(&self) -> Result<()>
pub async fn is_key_backup_enabled(&self) -> bool
pub fn engine(&self) -> &CryptoEngine
Trait Implementations§
Source§impl Clone for CryptoClient
impl Clone for CryptoClient
Source§fn clone(&self) -> CryptoClient
fn clone(&self) -> CryptoClient
Returns a duplicate 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 Freeze for CryptoClient
impl !RefUnwindSafe for CryptoClient
impl Send for CryptoClient
impl Sync for CryptoClient
impl Unpin for CryptoClient
impl UnsafeUnpin for CryptoClient
impl !UnwindSafe for CryptoClient
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