stelae 0.6.4

A collection of tools in Rust and Python for preserving, authenticating, and accessing laws in perpetuity.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use async_trait::async_trait;
use serde::{Deserialize, Serialize};

pub mod manager;

/// Trait for managing transactional documents.
#[async_trait]
pub trait TxManager {
    /// Create a new publication version.
    async fn create(&mut self, doc_id: &str) -> anyhow::Result<Option<i64>>;
}

#[derive(sqlx::FromRow, Deserialize, Serialize)]
/// Model for documents.
pub struct Document {
    /// Unique document identifier.
    pub doc_id: String,
}