pub struct EmbeddedOwnedSessionFactory { /* private fields */ }Expand description
Factory for owned local read and transaction sessions from one embedded database.
The factory owns the same Arc<AnyKV> as its source Database. Consequently, a session
and every cursor it opens keep the backend alive without borrowing the database or promoting
a legacy crate::Transaction lifetime.
Implementations§
Source§impl EmbeddedOwnedSessionFactory
impl EmbeddedOwnedSessionFactory
Sourcepub fn begin_read(&self, options: OwnedReadOptions) -> Result<OwnedReadSession>
pub fn begin_read(&self, options: OwnedReadOptions) -> Result<OwnedReadSession>
Begin one owned read-only session.
Sourcepub fn begin_transaction(
&self,
mode: TxnMode,
) -> Result<OwnedTransactionSession>
pub fn begin_transaction( &self, mode: TxnMode, ) -> Result<OwnedTransactionSession>
Begin one owned transaction session.
A transaction’s active lease, terminal effect, and exactly-once commit/rollback are enforced by the returned core session. This factory never performs an implicit commit.
Trait Implementations§
Source§impl Clone for EmbeddedOwnedSessionFactory
impl Clone for EmbeddedOwnedSessionFactory
Source§fn clone(&self) -> EmbeddedOwnedSessionFactory
fn clone(&self) -> EmbeddedOwnedSessionFactory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EmbeddedOwnedSessionFactory
impl RefUnwindSafe for EmbeddedOwnedSessionFactory
impl Send for EmbeddedOwnedSessionFactory
impl Sync for EmbeddedOwnedSessionFactory
impl Unpin for EmbeddedOwnedSessionFactory
impl UnsafeUnpin for EmbeddedOwnedSessionFactory
impl UnwindSafe for EmbeddedOwnedSessionFactory
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
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