lever 0.1.4

Pillars for Transactional Systems and Data Grids
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::result;
use thiserror::Error;

#[derive(Clone, Error, Debug)]
pub enum TxnError {
    #[error("Retry mechanism triggered")]
    Retry,
    #[error("Abort triggered")]
    Abort,
    #[error("Txn retry with: {0}")]
    RetryWithContext(String),
    #[error("Txn abort with: {0}")]
    AbortWithContext(String)
}

pub type TxnResult<T> = result::Result<T, TxnError>;