opentalk_client_data_persistence/data_manager.rs
1// SPDX-FileCopyrightText: OpenTalk GmbH <mail@opentalk.eu>
2//
3// SPDX-License-Identifier: EUPL-1.2
4
5use crate::{AccountTokens, DataError};
6
7/// The [DataManager] defines the interface for storing and loading data for the OpenTalk client locally
8pub trait DataManager: std::fmt::Debug + Sync {
9 /// Load the account tokens
10 fn load_account_tokens(&self) -> Result<AccountTokens, DataError>;
11
12 /// Store the account tokens
13 fn store_account_tokens(&self, opentalk_account_tokens: AccountTokens)
14 -> Result<(), DataError>;
15}