Struct sanakirja::MutTxn [−][src]
A mutable transaction.
Implementations
impl<E: Borrow<Env>, T> MutTxn<E, T>
[src]
pub fn set_root(&mut self, num: usize, value: u64)
[src]
Setting the num
th element of the initial page, treated as a
[u64; 510]
, to value
. This doesn’t actually write anything
to that page, since that page is written during the commit.
In the current implementation, value
is probably going to be
the offset in the file of the root page of a B tree.
pub fn remove_root(&mut self, num: usize)
[src]
Setting the num
th element of the initial page, treated as a
[u64; 510].
impl<E: Borrow<Env>, T> MutTxn<E, T>
[src]
pub fn root(&self, n: usize) -> Option<u64>
[src]
Low-level method to get the root page number n
, if that page
isn’t a B tree (use the RootDb
trait else).
Trait Implementations
impl<E: Borrow<Env>, T> AllocPage for MutTxn<E, T>
[src]
fn alloc_page(&mut self) -> Result<MutPage, Error>
[src]
Allocate a single page.
fn incr_rc(&mut self, off: u64) -> Result<usize, Error>
[src]
Increment the reference count for page off
.
fn decr_rc(&mut self, off: u64) -> Result<usize, Error>
[src]
fn decr_rc_owned(&mut self, off: u64) -> Result<usize, Error>
[src]
impl<'a, E: Borrow<Env>, T> Commit for MutTxn<E, &'a mut MutTxn<E, T>>
[src]
The following is very easy, we’re just extending all values of the current transaction with values of the subtransaction.
impl<E: Borrow<Env>> Commit for MutTxn<E, ()>
[src]
impl<E: Borrow<Env>, T> Debug for MutTxn<E, T>
[src]
impl<E: Borrow<Env>, T> Drop for MutTxn<E, T>
[src]
When dropping a transaction, we need to unlock the read-write locks internal to this process, and possibly the file locks.
impl<E: Borrow<Env>, A> LoadPage for MutTxn<E, A>
[src]
type Error = Error
fn load_page(&self, off: u64) -> Result<CowPage, Self::Error>
[src]
fn rc(&self, page: u64) -> Result<u64, Self::Error>
[src]
impl<E: Borrow<Env>, T> RootDb for MutTxn<E, T>
[src]
Auto Trait Implementations
impl<E, T> RefUnwindSafe for MutTxn<E, T> where
E: RefUnwindSafe,
T: RefUnwindSafe,
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<E, T> !Send for MutTxn<E, T>
impl<E, T> !Sync for MutTxn<E, T>
impl<E, T> Unpin for MutTxn<E, T> where
E: Unpin,
T: Unpin,
E: Unpin,
T: Unpin,
impl<E, T> UnwindSafe for MutTxn<E, T> where
E: UnwindSafe,
T: UnwindSafe,
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,