guardian-db 0.19.0

High-performance, local-first decentralized database built on Rust and Iroh
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::odm::schema::ModelSchema;
use serde::Serialize;
use serde::de::DeserializeOwned;

/// Implemented by strongly typed GuardianDB ODM models.
///
/// The [`Model`](guardian_db_derive::Model) derive macro generates this
/// implementation from field attributes such as `#[primary_key]` and
/// `#[unique]`.
pub trait Model: Serialize + DeserializeOwned + Send + Sync + 'static {
    fn schema() -> ModelSchema;
}