pub struct PTxnGuard(/* private fields */);Expand description
Newtype to hand out connections that can only be used for running transactions
Implementations§
Source§impl PTxnGuard
impl PTxnGuard
Sourcepub fn transaction(&mut self) -> DatabaseResult<Transaction<'_>>
pub fn transaction(&mut self) -> DatabaseResult<Transaction<'_>>
Start a new transaction on the inner connection held by this txn guard.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PTxnGuard
impl !RefUnwindSafe for PTxnGuard
impl Send for PTxnGuard
impl !Sync for PTxnGuard
impl Unpin for PTxnGuard
impl !UnwindSafe for PTxnGuard
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