identity_storage/storage/
mod.rs1mod error;
7#[macro_use]
8mod jwk_document_ext;
9#[cfg(feature = "jpt-bbs-plus")]
10mod jwp_document_ext;
11mod signature_options;
12#[cfg(feature = "jpt-bbs-plus")]
13mod timeframe_revocation_ext;
14
15#[cfg(all(test, feature = "memstore"))]
16pub(crate) mod tests;
17
18pub use error::*;
19
20pub use jwk_document_ext::*;
21#[cfg(feature = "jpt-bbs-plus")]
22pub use jwp_document_ext::*;
23pub use signature_options::*;
24#[cfg(feature = "jpt-bbs-plus")]
25pub use timeframe_revocation_ext::*;
26
27pub struct Storage<K, I> {
31  key_storage: K,
32  key_id_storage: I,
33}
34
35impl<K, I> Storage<K, I> {
36  pub fn new(key_storage: K, key_id_storage: I) -> Self {
38    Self {
39      key_storage,
40      key_id_storage,
41    }
42  }
43
44  pub fn key_storage(&self) -> &K {
46    &self.key_storage
47  }
48
49  pub fn key_id_storage(&self) -> &I {
51    &self.key_id_storage
52  }
53}