dittolive-ditto 4.13.3

Ditto is a peer to peer cross-platform database that allows mobile, web, IoT and server apps to sync with or without an internet connection.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::prelude::{identity, Ditto, DittoError, LogLevel};

pub fn setup_ditto() -> Result<Ditto, DittoError> {
    let ditto = Ditto::builder()
        .with_temp_dir()
        .with_identity(identity::OfflinePlayground::random)?
        .with_minimum_log_level(LogLevel::Error)
        .build()?;
    let _ = ditto.set_license_from_env("DITTO_LICENSE");
    ditto.disable_sync_with_v3().unwrap();
    Ok(ditto)
}