opentalk-client-data-persistence 0.0.1-alpha.13

Persistence functionality for use with the opentalk-client library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// SPDX-FileCopyrightText: OpenTalk GmbH <mail@opentalk.eu>
//
// SPDX-License-Identifier: EUPL-1.2

use crate::{AccountTokens, DataError};

/// The [DataManager] defines the interface for storing and loading data for the OpenTalk client locally
pub trait DataManager: std::fmt::Debug + Sync {
    /// Load the account tokens
    fn load_account_tokens(&self) -> Result<AccountTokens, DataError>;

    /// Store the account tokens
    fn store_account_tokens(&self, opentalk_account_tokens: AccountTokens)
    -> Result<(), DataError>;
}