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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! This module provides components to easily instantiate a Findex object using
//! a given backend:
//!
//! - [`InstantiatedFindex`](InstantiatedFindex): Findex wrapper that provides
//! Findex API;
//! - [`BackendConfiguration`](BackendConfiguration): configuration storing all
//! information required to instantiate a given backend.
//!
//! ```txt
//! +-----------------------------------------------------------------+
//! | +-----------------------------------------+ |
//! | | +----------+ +---------+ +--------+ | // |
//! | | | B. Redis | | B. HTTP | ... | B. FFI | | // Backend layer |
//! | | +----------+ +---------+ +--------+ | // |
//! | +-----------------------------------------+ |
//! | | Findex instance | |
//! | +-----------------------------------------+ |
//! | ^ ^ |
//! | | | |
//! | +---------------+ Findex |
//! | | Configuration | API |
//! | +---------------+ | |
//! | | v |
//! | ------------------------ |
//! | / | \ |
//! | +--------+ +---------+ +-----------+ // |
//! | | I. FFI | | I. WASM | | I. Python | // Interface layer |
//! | +--------+ +---------+ +-----------+ // |
//! | |
//! +-----------------------------------------------------------------+
//! | Cloudproof Rust |
//! +-----------------------------------------------------------------+
//! ^
//! |
//! v
//! +-----------------------------------------------------------------+
//! | Cloudproof Js/Python/Java/Flutter (optional) |
//! +-----------------------------------------------------------------+
//! ^
//! |
//! v
//! +-----------------------------------------------------------------+
//! | User Code |
//! +-----------------------------------------------------------------+
//! ```
//!
//! This split allows creating a neat abstraction of the backend and Findex
//! instantiation machinery, that can be used easily in the interface layer.
//!
//! This also has the advantage of gathering all instantiation information in a
//! single place.
pub use Configuration;
pub use InstantiatedFindex;