triplox-client 0.1.0-alpha.5

HTTP/2 client for Triplox, a Datalog database.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::{Deserialize, Serialize};
use std::error::Error;

pub type Instant = chrono::DateTime<chrono::Utc>;

#[derive(Clone, Copy, Serialize, Deserialize, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct TxKey {
    pub tx_id: i64,
    pub system_time: Instant,
}

#[derive(Debug)]
pub enum TransactionResult {
    TxCommitted(TxKey),
    TxAborted(TxKey, Box<dyn Error>),
}