From 82c3a795ff8d03494bf4330e6fea777a65e9e36a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 12 Aug 2020 13:28:16 +0200 Subject: [PATCH] crypto: More doc improvements. --- matrix_sdk_crypto/src/machine.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/matrix_sdk_crypto/src/machine.rs b/matrix_sdk_crypto/src/machine.rs index 9828467b..92789ea6 100644 --- a/matrix_sdk_crypto/src/machine.rs +++ b/matrix_sdk_crypto/src/machine.rs @@ -804,11 +804,11 @@ impl OlmMachine { /// Encrypt a room message for the given room. /// /// Beware that a group session needs to be shared before this method can be - /// called using the `share_group_session()` method. + /// called using the [`share_group_session()`] method. /// /// Since group sessions can expire or become invalid if the room membership /// changes client authors should check with the - /// `should_share_group_session()` method if a new group session needs to + /// [`should_share_group_session`] method if a new group session needs to /// be shared. /// /// # Arguments @@ -822,6 +822,9 @@ impl OlmMachine { /// # Panics /// /// Panics if a group session for the given room wasn't shared beforehand. + /// + /// [`should_share_group_session`]: #method.should_share_group_session + /// [`share_group_session`]: #method.share_group_session pub async fn encrypt( &self, room_id: &RoomId, @@ -1236,6 +1239,12 @@ impl OlmMachine { /// Get the set of users that we need to query keys for. /// /// Returns a hash set of users that need to be queried for keys. + /// + /// The response of a successful key query requests needs to be passed to + /// the [`OlmMachine`] with the [`receive_keys_query_response`]. + /// + /// [`OlmMachine`]: struct.OlmMachine.html + /// [`receive_keys_query_response`]: #method.receive_keys_query_response pub async fn users_for_key_query(&self) -> HashSet { self.store.users_for_key_query() }