[][src]Struct mysql::Transaction

pub struct Transaction<'a> { /* fields omitted */ }

Implementations

impl<'_> Transaction<'_>[src]

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

Will consume and commit transaction.

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

Will consume and rollback transaction. You also can rely on Drop implementation but it will swallow errors.

pub fn set_local_infile_handler(&mut self, handler: Option<LocalInfileHandler>)[src]

A way to override local infile handler for this transaction. Destructor of transaction will restore original handler.

pub fn affected_rows(&self) -> u64[src]

Returns the number of affected rows, reported by the server.

pub fn last_insert_id(&self) -> Option<u64>[src]

Returns the last insert id of the last query, if any.

pub fn warnings(&self) -> u16[src]

Returns the warnings count, reported by the server.

pub fn info_ref(&self) -> &[u8][src]

Info, reported by the server.

Will be empty if not defined.

pub fn info_str(&self) -> Cow<'_, str>[src]

Info, reported by the server.

Will be empty if not defined.

Trait Implementations

impl<'a> Debug for Transaction<'a>[src]

impl<'a> Drop for Transaction<'a>[src]

pub fn drop(&mut self)[src]

Will rollback transaction.

impl<'a> Queryable for Transaction<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Transaction<'a>

impl<'a> Send for Transaction<'a>

impl<'a> Sync for Transaction<'a>

impl<'a> Unpin for Transaction<'a>

impl<'a> !UnwindSafe for Transaction<'a>

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