Skip to main content

SQLiteSetTransaction

Struct SQLiteSetTransaction 

Source
pub struct SQLiteSetTransaction<'a, T>
where T: Type,
{ /* private fields */ }
Expand description

Represents an active SQLite transaction for a SQLiteSet.

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

The transaction is committed when the SQLiteSetTransaction is dropped.

Implementations§

Source§

impl<'a, T> SQLiteSetTransaction<'a, T>
where T: Type,

Source

pub fn commit(self)

Drops the SQLiteSetTransaction, thereby committing the SQLite transaction.

Source

pub fn insert<Q>(&mut self, key: &Q) -> Result<bool, Error>
where T: Borrow<Q>, Q: ?Sized + ToSql,

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

Source

pub fn contains<Q>(&self, key: &Q) -> Result<bool, Error>
where T: Borrow<Q>, Q: ?Sized + ToSql,

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

Source

pub fn contains_nocase<Q>(&self, key: &Q) -> Result<bool, Error>
where T: Borrow<Q> + CharType, Q: ?Sized + ToSql,

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

Source

pub fn remove<Q>(&mut self, key: &Q) -> Result<bool, Error>
where T: Borrow<Q>, Q: ?Sized + ToSql,

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

Source

pub fn remove_nocase<Q>(&mut self, key: &Q) -> Result<bool, Error>
where T: Borrow<Q> + CharType, Q: ?Sized + ToSql,

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

Source

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

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

Source

pub fn find<P, Q>(&self, predicate: P) -> Result<Option<T>, Error>
where P: Fn(&Q) -> bool, T: Borrow<Q>, Q: ?Sized,

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

Source

pub fn filter<F, Q>(&self, pattern: &Q, callback: F) -> Result<(), Error>
where F: FnMut(T), T: Borrow<Q> + CharType, Q: ?Sized + ToSql,

This function is equivalent to SQLiteSet::filter().

Source

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

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

Source

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

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

Source

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

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

Auto Trait Implementations§

§

impl<'a, T> !RefUnwindSafe for SQLiteSetTransaction<'a, T>

§

impl<'a, T> !Send for SQLiteSetTransaction<'a, T>

§

impl<'a, T> !Sync for SQLiteSetTransaction<'a, T>

§

impl<'a, T> !UnwindSafe for SQLiteSetTransaction<'a, T>

§

impl<'a, T> Freeze for SQLiteSetTransaction<'a, T>
where PhantomData<T>: Freeze,

§

impl<'a, T> Unpin for SQLiteSetTransaction<'a, T>
where PhantomData<T>: Unpin,

§

impl<'a, T> UnsafeUnpin for SQLiteSetTransaction<'a, T>

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.