DbPage

Struct DbPage 

Source
pub struct DbPage<'a, K: ?Sized + Storable + PartialEq, V: ?Sized + Storable + PartialEq, P: BTreeMutPage<K, V> + BTreePage<K, V>, RK: ?Sized + Encode<K>, RV: ?Sized + Encode<V>> {
    pub id: usize,
    /* private fields */
}

Fields§

§id: usize

Implementations§

Source§

impl<'a, K: ?Sized + Storable + PartialEq, V: ?Sized + Storable + PartialEq, P: BTreeMutPage<K, V> + BTreePage<K, V>, RK: ?Sized + Encode<K>, RV: ?Sized + Encode<V>> DbPage<'a, K, V, P, RK, RV>

Source

pub fn upsert(&self, k: &RK, v: &RV) -> Result<bool, Error>

Source

pub fn put(&self, k: &RK, v: &RV) -> Result<bool, Error>

Source

pub fn rm(&self, k: &RK) -> Result<usize, Error>

Source

pub fn one( &self, k: &'a RK, ) -> Result<Option<&'a V>, <TxnEnv<'_> as LoadPage>::Error>

Source

pub fn exist( &self, k: &RK, v: &RV, ) -> Result<bool, <TxnEnv<'_> as LoadPage>::Error>

Source

pub fn rm1<IntoV: Into<Option<&'a RV>>>( &self, k: &RK, v: IntoV, ) -> Result<bool, Error>

Source

pub fn key_iter( &self, k: &'a RK, ) -> Result<Box<dyn Iterator<Item = Result<(&'a K, &'a V), <TxnEnv<'_> as LoadPage>::Error>> + 'a>, <TxnEnv<'_> as LoadPage>::Error>

Source

pub fn iter<OptionK: Into<Option<&'a RK>>, OptionV: Into<Option<&'a RV>>>( &self, k: OptionK, v: OptionV, ) -> Result<Iter<'_, TxnEnv<'_>, K, V, P>, <TxnEnv<'_> as LoadPage>::Error>

Source

pub fn riter<OptionK: Into<Option<&'a RK>>, OptionV: Into<Option<&'a RV>>>( &self, k: OptionK, v: OptionV, ) -> Result<RevIter<'_, TxnEnv<'_>, K, V, P>, <TxnEnv<'_> as LoadPage>::Error>

Auto Trait Implementations§

§

impl<'a, K, V, P, RK, RV> Freeze for DbPage<'a, K, V, P, RK, RV>
where K: ?Sized, V: ?Sized, RK: ?Sized, RV: ?Sized,

§

impl<'a, K, V, P, RK, RV> !RefUnwindSafe for DbPage<'a, K, V, P, RK, RV>

§

impl<'a, K, V, P, RK, RV> Send for DbPage<'a, K, V, P, RK, RV>
where K: Sync + ?Sized, V: Sync + ?Sized, P: Sync, RK: Sync + ?Sized, RV: Sync + ?Sized,

§

impl<'a, K, V, P, RK, RV> Sync for DbPage<'a, K, V, P, RK, RV>
where K: Sync + ?Sized, V: Sync + ?Sized, P: Sync, RK: Sync + ?Sized, RV: Sync + ?Sized,

§

impl<'a, K, V, P, RK, RV> Unpin for DbPage<'a, K, V, P, RK, RV>
where K: ?Sized, V: ?Sized, RK: ?Sized, RV: ?Sized,

§

impl<'a, K, V, P, RK, RV> !UnwindSafe for DbPage<'a, K, V, P, RK, RV>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.