Struct persy::TransactionConfig
source · pub struct TransactionConfig { /* private fields */ }
Expand description
Configure the parameters for the transaction on the begin of a new transaction.
Implementations§
source§impl TransactionConfig
impl TransactionConfig
pub fn new() -> Self
sourcepub fn set_strategy(self, strategy: TxStrategy) -> Self
pub fn set_strategy(self, strategy: TxStrategy) -> Self
Set the transaction concurrency checks, experimental use carefully
sourcepub fn set_background_sync(self, background: bool) -> Self
pub fn set_background_sync(self, background: bool) -> Self
Set if the transaction will be fsync-ed in background or on the current thread this option is available only if the “background_ops” feature is enabled
sourcepub fn set_transaction_id(self, transaction_id: TransactionId) -> Self
pub fn set_transaction_id(self, transaction_id: TransactionId) -> Self
Set the transaction id to be used in case of crash recovery.
The id must be maximum 512 bytes of length
Trait Implementations§
source§impl Clone for TransactionConfig
impl Clone for TransactionConfig
source§fn clone(&self) -> TransactionConfig
fn clone(&self) -> TransactionConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for TransactionConfig
impl Default for TransactionConfig
source§fn default() -> TransactionConfig
fn default() -> TransactionConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for TransactionConfig
impl Send for TransactionConfig
impl Sync for TransactionConfig
impl Unpin for TransactionConfig
impl UnwindSafe for TransactionConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more