use default type parameter instead of newtype
[?]
9FZSPF6U3oQmpTwxvCnadrHKQEqTkEpnrDg1UWw9Zo9E
Oct 26, 2021, 12:28 AM
O4PSZ7TQINXL4PQI3ZHAAY2A2EDNJLDB7F7CZI7IQHT7DQ6W2UXQCDependencies
- [2]
FREPDP7Badd simple parametric rc impl - [3]
NW4S4ZCCrename MutTxn to GenericMutTxn - [4]
YDHYZA77Adding the RootPage trait to access the raw bytes of a root page (needed in libpijul) - [5]
W2MIZD5BSingle file databases + CRC for the root pages (checking the other pages makes everything very slow) - [6]
OP6SVMODResetting history - [7]
YWFYZNLZCleanup + inter-process concurrency - [8]
ECPAFJSBadd env_borrow for Txn and MutTxn - [9]
WS4ZQM4RDebugging, tests, etc. - [10]
E4MD6T3LProofreading and commenting of this crate (massive bug fixes included) - [11]
TJ2R4HAZAccessing the root pages (unsafely, of course) - [12]
EDTFMMZWadd dummy RcEntry trait for rc tree key - [13]
FFERM7K5add type alias with default rc impl - [14]
SO25TWFLA few features for integrating it into Pijul - [15]
YXKP4AIWNew file locks, with multiple sets of free pages - [16]
KMT3MF5NDrop a database - [17]
YATBB4O7run cargo fmt
Change contents
- replacement in "sanakirja/src/lib.rs" at line 107
pub use environment::{Commit, Env, GenericMutTxn, MutTxn, RootDb, RootPage, Txn};pub use environment::{Commit, Env, MutTxn, RootDb, RootPage, Txn}; - replacement in "sanakirja/src/environment/muttxn.rs" at line 5
impl<E: Borrow<Env>, T, R: RcEntry> std::fmt::Debug for GenericMutTxn<E, T, R> {impl<E: Borrow<Env>, T, R: RcEntry> std::fmt::Debug for MutTxn<E, T, R> { - edit in "sanakirja/src/environment/muttxn.rs" at line 32[2.413]→[2.413:531](∅→∅),[3.107]→[3.37287:37288](∅→∅),[3.119]→[3.37287:37288](∅→∅),[3.147]→[3.37287:37288](∅→∅),[2.531]→[3.37287:37288](∅→∅),[3.37287]→[3.37287:37288](∅→∅)
/// A mutable transaction using 12 bits for the reference counting.pub type MutTxn<E, T> = GenericMutTxn<E, T, u64>; - replacement in "sanakirja/src/environment/muttxn.rs" at line 33
pub struct GenericMutTxn<E: Borrow<Env>, T, R: RcEntry> {pub struct MutTxn<E: Borrow<Env>, T, R: RcEntry = u64> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 72
impl<E: Borrow<Env>, T, R: RcEntry> GenericMutTxn<E, T, R> {impl<E: Borrow<Env>, T, R: RcEntry> MutTxn<E, T, R> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 81
impl<E: Borrow<Env>, T, R: RcEntry> Drop for GenericMutTxn<E, T, R> {impl<E: Borrow<Env>, T, R: RcEntry> Drop for MutTxn<E, T, R> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 103
impl<'a, E: Borrow<Env>, T, R: RcEntry> Commitfor GenericMutTxn<E, &'a mut GenericMutTxn<E, T, R>, R>{impl<'a, E: Borrow<Env>, T, R: RcEntry> Commit for MutTxn<E, &'a mut MutTxn<E, T, R>, R> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 168
pub fn mut_txn_begin<E: Borrow<Self>, R: RcEntry>(pub fn mut_txn_begin<E: Borrow<Self>>(env: E) -> Result<MutTxn<E, ()>, Error> {Self::mut_txn_begin_generic_rc(env)}/// Start a mutable transaction. Mutable transactions that go out/// of scope are automatically aborted.pub fn mut_txn_begin_generic_rc<E: Borrow<Self>, R: RcEntry>( - replacement in "sanakirja/src/environment/muttxn.rs" at line 176
) -> Result<GenericMutTxn<E, (), R>, Error> {) -> Result<MutTxn<E, (), R>, Error> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 207
Ok(GenericMutTxn {Ok(MutTxn { - replacement in "sanakirja/src/environment/muttxn.rs" at line 241
impl<E: Borrow<Env>, R: RcEntry> Commit for GenericMutTxn<E, (), R> {impl<E: Borrow<Env>, R: RcEntry> Commit for MutTxn<E, (), R> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 365
impl<E: Borrow<Env>, T, R: RcEntry> GenericMutTxn<E, T, R> {impl<E: Borrow<Env>, T, R: RcEntry> MutTxn<E, T, R> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 476
impl<E: Borrow<Env>, T, R: RcEntry> sanakirja_core::AllocPage for GenericMutTxn<E, T, R> {impl<E: Borrow<Env>, T, R: RcEntry> sanakirja_core::AllocPage for MutTxn<E, T, R> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 559
impl<E: Borrow<Env>, A, R: RcEntry> GenericMutTxn<E, A, R> {impl<E: Borrow<Env>, A, R: RcEntry> MutTxn<E, A, R> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 624
impl<E: Borrow<Env>, A, R: RcEntry> sanakirja_core::LoadPage for GenericMutTxn<E, A, R> {impl<E: Borrow<Env>, A, R: RcEntry> sanakirja_core::LoadPage for MutTxn<E, A, R> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 649
impl<E: Borrow<Env>, T, R: RcEntry> RootPage for GenericMutTxn<E, T, R> {impl<E: Borrow<Env>, T, R: RcEntry> RootPage for MutTxn<E, T, R> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 658
impl<E: Borrow<Env>, T, R: RcEntry> GenericMutTxn<E, T, R> {impl<E: Borrow<Env>, T, R: RcEntry> MutTxn<E, T, R> { - replacement in "sanakirja/src/environment/muttxn.rs" at line 684
impl<E: Borrow<Env>, T, R: RcEntry> RootDb for GenericMutTxn<E, T, R> {impl<E: Borrow<Env>, T, R: RcEntry> RootDb for MutTxn<E, T, R> {