Skip to main content

SQLiteMapTransaction

Struct SQLiteMapTransaction 

Source
pub struct SQLiteMapTransaction<'a> { /* private fields */ }
Expand description

Represents an active SQLite transaction for a SQLiteMap.

Most functions provided by this struct mirror the corresponding functions of the SQLiteMap struct.

The transaction is committed when the SQLiteMapTransaction is dropped.

Implementations§

Source§

impl<'a> SQLiteMapTransaction<'a>

Source

pub fn commit(self)

Drops the SQLiteMapTransaction, thereby committing the SQLite transaction.

Source

pub fn insert(&mut self, key: &str, value: &str) -> Result<bool, Error>

This function is equivalent to SQLiteMap::insert().

Source

pub fn update(&mut self, key: &str, value: &str) -> Result<(), Error>

This function is equivalent to SQLiteMap::update().

Source

pub fn contains(&self, key: &str) -> Result<bool, Error>

This function is equivalent to SQLiteMap::contains().

Source

pub fn contains_nocase(&self, key: &str) -> Result<bool, Error>

This function is equivalent to SQLiteMap::contains_nocase().

Source

pub fn get(&self, key: &str) -> Result<Option<String>, Error>

This function is equivalent to SQLiteMap::get().

Source

pub fn get_nocase(&self, key: &str) -> Result<Option<String>, Error>

This function is equivalent to SQLiteMap::get_nocase().

Source

pub fn remove(&mut self, key: &str) -> Result<bool, Error>

This function is equivalent to SQLiteMap::remove().

Source

pub fn remove_nocase(&mut self, key: &str) -> Result<bool, Error>

This function is equivalent to SQLiteMap::remove_nocase().

Source

pub fn for_each<F>(&self, callback: F) -> Result<(), Error>
where F: FnMut(&str, &str),

This function is equivalent to SQLiteMap::for_each().

Source

pub fn find<P>(&self, predicate: P) -> Result<Option<(String, String)>, Error>
where P: Fn(&str, &str) -> bool,

This function is equivalent to SQLiteMap::find().

Source

pub fn len(&self) -> Result<SizeT, Error>

This function is equivalent to SQLiteMap::len().

Source

pub fn is_empty(&self) -> Result<bool, Error>

This function is equivalent to SQLiteMap::is_empty().

Source

pub fn clear(&mut self) -> Result<(), Error>

This function is equivalent to SQLiteMap::clear().

Auto Trait Implementations§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.