hopr_db_api/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Crate for abstracting the required DB behavior of a HOPR node.
//!
//! Functionality defined here is meant to be used mostly by other higher-level crates.

pub mod errors;
pub mod info;
pub mod logs;
pub mod peers;
pub mod protocol;
pub mod resolver;
pub mod tickets;

use crate::{
    logs::HoprDbLogOperations, peers::HoprDbPeersOperations, protocol::HoprDbProtocolOperations,
    resolver::HoprDbResolverOperations, tickets::HoprDbTicketOperations,
};

/// Convenience trait that contains all HOPR DB operation interfaces.
pub trait HoprDbAllAbstractedOperations:
    HoprDbTicketOperations
    + HoprDbPeersOperations
    + HoprDbResolverOperations
    + HoprDbProtocolOperations
    + HoprDbLogOperations
{
}

#[doc(hidden)]
pub mod prelude {
    pub use super::*;
    pub use crate::errors::*;
    pub use crate::info::*;
    pub use crate::logs::*;
    pub use crate::peers::*;
    pub use crate::protocol::*;
    pub use crate::resolver::*;
    pub use crate::tickets::*;
}