Struct mysql_async::TxOpts[][src]

pub struct TxOpts { /* fields omitted */ }

Transaction options.

Example:

let tx_opts = TxOpts::default()
    .with_consistent_snapshot(true)
    .with_isolation_level(IsolationLevel::RepeatableRead);

Implementations

impl TxOpts[src]

pub fn new() -> TxOpts[src]

Creates a default instance.

pub fn with_consistent_snapshot(&mut self, value: bool) -> &mut Self[src]

pub fn with_isolation_level<T>(&mut self, value: T) -> &mut Self where
    T: Into<Option<IsolationLevel>>, 
[src]

pub fn with_readonly<T>(&mut self, value: T) -> &mut Self where
    T: Into<Option<bool>>, 
[src]

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

If true, then START TRANSACTION WITH CONSISTENT SNAPSHOT will be performed. Defaults to false.

pub fn isolation_level(&self) -> Option<IsolationLevel>[src]

If not None, then SET TRANSACTION ISOLATION LEVEL .. will be performed. Defaults to None.

pub fn readonly(&self) -> Option<bool>[src]

If not None, then SET TRANSACTION READ ONLY|WRITE will be performed. Defaults to None.

Only available since MySql 5.6.5.

Trait Implementations

impl Clone for TxOpts[src]

impl Debug for TxOpts[src]

impl Default for TxOpts[src]

impl Eq for TxOpts[src]

impl Hash for TxOpts[src]

impl PartialEq<TxOpts> for TxOpts[src]

impl StructuralEq for TxOpts[src]

impl StructuralPartialEq for TxOpts[src]

Auto Trait Implementations

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> CallHasher for T where
    T: Hash

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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