1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
mod ext; // pub use ext::*; use crate::{Context, StmError}; pub trait Transaction { type Output; fn atomically<'this: 'var, 'context, 'var>( &'this self, context: &'context mut Context<'var>, ) -> Result<Self::Output, StmError>; } // how to forbid (|trans| Ok(trans) ) // pub trait NewTransaction { // type Output; // type Context<'var>; // fn atomically<'var>(&self, context: Self::Context<'var>) -> Result<Self::Output, StmError>; // }