commonware_sync/
lib.rs

1//! Synchronize state between a server and client.
2//!
3//! This example shows how to use synchronize a client [commonware_storage::adb::any::fixed::Any]
4//! database to a remote server's database.
5//!
6//! It includes network protocols, database configuration, and utilities for creating test data.
7
8#![doc(
9    html_logo_url = "https://commonware.xyz/imgs/rustdoc_logo.svg",
10    html_favicon_url = "https://commonware.xyz/favicon.ico"
11)]
12
13pub mod error;
14pub use error::Error;
15pub mod databases;
16pub mod net;
17pub use databases::{any, immutable};
18
19/// Returns the version of the crate.
20pub fn crate_version() -> &'static str {
21    env!("CARGO_PKG_VERSION")
22}
23
24/// Hasher type used in the database.
25pub type Hasher = commonware_cryptography::sha256::Sha256;
26
27/// Digest type used in the database.
28pub type Digest = commonware_cryptography::sha256::Digest;
29
30/// Key type used in the database.
31pub type Key = commonware_cryptography::sha256::Digest;
32
33/// Value type used in the database.
34pub type Value = commonware_cryptography::sha256::Digest;
35
36/// Translator type for the database.
37pub type Translator = commonware_storage::translator::EightCap;