[][src]Struct places::db::PlacesTransaction

pub struct PlacesTransaction<'conn>(PlacesTransactionRepr<'conn>);

High level transaction type which "does the right thing" for you. Construct one with PlacesDb::begin_transaction().

Implementations

impl<'conn> PlacesTransaction<'conn>[src]

pub fn should_commit(&self) -> bool[src]

Returns true if the current transaction should be committed at the earliest opportunity.

pub fn maybe_commit(&mut self) -> Result<()>[src]

  • For transactions on sync connnections: Checks to see if we have held a transaction for longer than the requested time, and if so, commits the current transaction and opens another.
  • For transactions on other connections: debug_assert!s, or logs a warning and does nothing.

pub fn commit(self) -> Result<()>[src]

Consumes and commits a PlacesTransaction transaction.

pub fn rollback(self) -> Result<()>[src]

Consumes and attempst to roll back a PlacesTransaction. Note that if maybe_commit has been called, this may only roll back as far as that call.

Trait Implementations

impl<'conn> ConnExt for PlacesTransaction<'conn>[src]

impl<'conn> Deref for PlacesTransaction<'conn>[src]

type Target = Connection

The resulting type after dereferencing.

Auto Trait Implementations

impl<'conn> !RefUnwindSafe for PlacesTransaction<'conn>

impl<'conn> !Send for PlacesTransaction<'conn>

impl<'conn> !Sync for PlacesTransaction<'conn>

impl<'conn> Unpin for PlacesTransaction<'conn>

impl<'conn> !UnwindSafe for PlacesTransaction<'conn>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,