sos_sync/lib.rs
1#![deny(missing_docs)]
2#![forbid(unsafe_code)]
3#![cfg_attr(all(doc, CHANNEL_NIGHTLY), feature(doc_auto_cfg))]
4//! Core types and traits for sync and merge operations; part of the
5//! [Save Our Secrets](https://saveoursecrets.com) SDK.
6mod error;
7mod traits;
8mod types;
9
10pub use error::Error;
11
12pub use traits::*;
13pub use types::*;
14
15/// Result type for the library.
16pub(crate) type Result<T> = std::result::Result<T, Error>;
17
18/// Direction of a sync.
19#[derive(Debug, Clone, Copy)]
20pub enum SyncDirection {
21 /// Create accounts on remote from the local.
22 ///
23 /// Used when a local account is pushing data to
24 /// a server for syncing with other devices.
25 Push,
26 /// Create accounts on local from the remote.
27 ///
28 /// Used by in-memory implementations without
29 /// networking suppport.
30 Pull,
31}