diff --git a/matrix_sdk_crypto/src/lib.rs b/matrix_sdk_crypto/src/lib.rs index 58d9c4e1..7d31aceb 100644 --- a/matrix_sdk_crypto/src/lib.rs +++ b/matrix_sdk_crypto/src/lib.rs @@ -30,8 +30,8 @@ mod device; mod error; mod machine; -mod memory_stores; -mod olm; +pub mod memory_stores; +pub mod olm; mod requests; mod store; #[allow(dead_code)] @@ -41,10 +41,9 @@ mod verification; pub use device::{Device, LocalTrust, ReadOnlyDevice, UserDevices}; pub use error::{MegolmError, OlmError}; pub use machine::OlmMachine; -pub use memory_stores::{DeviceStore, GroupSessionStore, ReadOnlyUserDevices, SessionStore}; -pub use olm::{ - Account, EncryptionSettings, IdentityKeys, InboundGroupSession, OutboundGroupSession, Session, -}; +use memory_stores::ReadOnlyUserDevices; +pub use olm::EncryptionSettings; +pub(crate) use olm::{Account, IdentityKeys, InboundGroupSession, Session}; pub use requests::{IncomingResponse, OutgoingRequest, OutgoingRequests}; #[cfg(feature = "sqlite_cryptostore")] pub use store::sqlite::SqliteStore; diff --git a/matrix_sdk_crypto/src/memory_stores.rs b/matrix_sdk_crypto/src/memory_stores.rs index 307d339b..5fcf71f3 100644 --- a/matrix_sdk_crypto/src/memory_stores.rs +++ b/matrix_sdk_crypto/src/memory_stores.rs @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +//! Collection of small in-memory stores that can be used to cache Olm objects. +//! +//! Note: You'll only be interested in these if you are implementing a custom +//! `CryptoStore`. + use std::{collections::HashMap, sync::Arc}; use dashmap::{DashMap, ReadOnlyView}; diff --git a/matrix_sdk_crypto/src/olm/mod.rs b/matrix_sdk_crypto/src/olm/mod.rs index af1416a4..af597d95 100644 --- a/matrix_sdk_crypto/src/olm/mod.rs +++ b/matrix_sdk_crypto/src/olm/mod.rs @@ -12,15 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +//! The crypto specific Olm objects. +//! +//! Note: You'll only be interested in these if you are implementing a custom +//! `CryptoStore`. + mod account; mod group_sessions; mod session; pub use account::{Account, IdentityKeys}; -pub use group_sessions::{ - EncryptionSettings, GroupSessionKey, InboundGroupSession, OutboundGroupSession, -}; -pub use session::{OlmMessage, Session}; +pub use group_sessions::{EncryptionSettings, InboundGroupSession}; +pub(crate) use group_sessions::{GroupSessionKey, OutboundGroupSession}; +pub(crate) use session::OlmMessage; +pub use session::Session; #[cfg(test)] pub(crate) mod test {