1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//! Persistent data storage
//!
//! In this module, you will find the traits and implementations for long-term data storage for
//! your XMPP client, server, or component. In particular, the following modules:
//!
//! - [blob] contains binary storage

pub mod blob;
pub use blob::{
    BlobEntry, BlobStoreFS, BlobStoreInterface, BlobTable, BlobTableInterface, TABLE_AVATAR,
};

/// Any error when loading/saving data with a data store.
#[derive(Debug)]
pub struct StoreError(Box<dyn std::error::Error + Send>);

impl<E: std::error::Error + 'static + Send> From<E> for StoreError {
    fn from(e: E) -> StoreError {
        StoreError(Box::new(e))
    }
}