[−][src]Struct sanakirja::Txn
An immutable transaction.
Methods
impl<'a> Txn<'a>
[src]
pub fn statistics(&self) -> Statistics
[src]
Compute statistics about pages. This is a potentially costlty operation, as we need to go through all bookkeeping pages.
pub fn references<K: Representable, V: Representable>(
&self,
h: &mut HashSet<u64>,
root: Db<K, V>
)
[src]
&self,
h: &mut HashSet<u64>,
root: Db<K, V>
)
Fills the h
argument with the set of all pages referenced at
least once in the tree whose root is root
.
Trait Implementations
impl<'env> Transaction for Txn<'env>
[src]
ⓘImportant traits for Cursor<'a, T, K, V>fn iter<'a, K: Representable, V: Representable>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V>
[src]
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V>
Iterate over a database, starting at the first value larger than or equal to (key, value)
(and at the smallest key, or smallest value if one or both of them is None
). Read more
ⓘImportant traits for RevCursor<'a, T, K, V>fn rev_iter<'a, K: Representable, V: Representable>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V>
[src]
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V>
Iterate over a database in the reverse order, starting from the last binding strictly before k
(or from the last binding in the table if k.is_none()
).
fn set_cursors<K: Representable, V: Representable>(
&self,
root: &Db<K, V>,
key: Option<(K, Option<V>)>
) -> (CursorStack, bool)
[src]
&self,
root: &Db<K, V>,
key: Option<(K, Option<V>)>
) -> (CursorStack, bool)
Create a cursor positionned just before key
.
fn root<K: Representable, V: Representable>(
&self,
root: usize
) -> Option<Db<K, V>>
[src]
&self,
root: usize
) -> Option<Db<K, V>>
Gets the specified root. At most 508 different roots are allowed.
fn get<'a, K: Representable, V: Representable>(
&'a self,
root: &Db<K, V>,
key: K,
value: Option<V>
) -> Option<V>
[src]
&'a self,
root: &Db<K, V>,
key: K,
value: Option<V>
) -> Option<V>
Get the smallest value associated to key
, or returns the given binding if value
is Some(..)
and is associated to key
in the given database. Read more
impl<'env> Drop for Txn<'env>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,