[][src]Struct mysql_async::Transaction

pub struct Transaction<T>(_);

This struct represents MySql transaction.

Transaction it's a sugar for START TRANSACTION, ROLLBACK and COMMIT queries, so one should note that it is easy to mess things up calling this queries manually. Also you will get NestedTransaction error if you call transaction.start_transaction(_).

Methods

impl<T: Queryable + ConnectionLike> Transaction<T>[src]

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

Returns future that will perform COMMIT query and resolve to a wrapped Queryable.

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

Returns future that will perform ROLLBACK query and resolve to a wrapped Queryable.

Trait Implementations

impl<T: Queryable + ConnectionLike> Queryable for Transaction<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Transaction<T> where
    T: RefUnwindSafe

impl<T> Send for Transaction<T> where
    T: Send

impl<T> Sync for Transaction<T> where
    T: Sync

impl<T> Unpin for Transaction<T> where
    T: Unpin

impl<T> UnwindSafe for Transaction<T> where
    T: UnwindSafe

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> ConnectionLike for T where
    T: ConnectionLike, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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>,