mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-06 06:53:32 -04:00
This patch allows an `OlmMachine` to use a different store than Sled, like SQLite. A new enum is introduced: `StoreType` which 2 variants: `Sled` (the default), and `Sqlite`. The `OlmMachine.initialize` constructor now takes a new optional `store_type: Option<StoreType>` argument. If no value is passed, the default `StoreType` variant will be used (as mentioned: `StoreType.Sled`). The code has been rewritten a little bit to make the type system happy without introducing too much type indirections. This patch finally adds a parameterized tests that exhaustively test: no store type, `Sled` and `Sqlite`.