Function matrix_sdk_sql::store_config
source · [−]pub async fn store_config<DB: SupportedDatabase>(
db: &Arc<Pool<DB>>,
passphrase: Option<&str>
) -> Result<StoreConfig> where
<DB as Database>::Connection: Migrate,
for<'a> <DB as HasArguments<'a>>::Arguments: IntoArguments<'a, DB>,
for<'c> &'c mut <DB as Database>::Connection: Executor<'c, Database = DB>,
for<'c, 'a> &'a mut Transaction<'c, DB>: Executor<'a, Database = DB>,
for<'a> &'a [u8]: BorrowedSqlType<'a, DB>,
for<'a> &'a str: BorrowedSqlType<'a, DB>,
Vec<u8>: SqlType<DB>,
String: SqlType<DB>,
bool: SqlType<DB>,
Vec<u8>: SqlType<DB>,
Option<String>: SqlType<DB>,
Json<Raw<AnyGlobalAccountDataEvent>>: SqlType<DB>,
Json<Raw<PresenceEvent>>: SqlType<DB>,
Json<SyncRoomMemberEvent>: SqlType<DB>,
Json<MinimalRoomMemberEvent>: SqlType<DB>,
Json<Raw<AnySyncStateEvent>>: SqlType<DB>,
Json<Raw<AnyRoomAccountDataEvent>>: SqlType<DB>,
Json<RoomInfo>: SqlType<DB>,
Json<Receipt>: SqlType<DB>,
Json<Raw<AnyStrippedStateEvent>>: SqlType<DB>,
Json<StrippedRoomMemberEvent>: SqlType<DB>,
Json<MemberEvent>: SqlType<DB>,
for<'a> &'a str: ColumnIndex<<DB as Database>::Row>,
Expand description
Creates a new store confiig
Errors
This function will return an error if the migration cannot be applied, or if the passphrase is incorrect