pub struct SqlTransactionManager { /* private fields */ }Expand description
TransactionManager serving one catalog datasource.
The registry keys the manager by TransactionManager::datasource; every
typed error the session raises already names that datasource.
Implementations§
Source§impl SqlTransactionManager
impl SqlTransactionManager
Sourcepub fn new(
datasource: impl Into<String>,
catalog: Arc<dyn DatasourceCatalog>,
) -> Self
pub fn new( datasource: impl Into<String>, catalog: Arc<dyn DatasourceCatalog>, ) -> Self
Manager for datasource, resolving its pool through catalog.
Sourcepub fn with_acquire_deadline(self, acquire_deadline: Duration) -> Self
pub fn with_acquire_deadline(self, acquire_deadline: Duration) -> Self
Override the acquire deadline (tests and embedders that own their pool options).
Trait Implementations§
Source§impl TransactionManager for SqlTransactionManager
impl TransactionManager for SqlTransactionManager
Source§fn datasource(&self) -> &str
fn datasource(&self) -> &str
Datasource name this manager serves. Read more
Source§fn open_session(&self) -> OpenSessionFuture<'_>
fn open_session(&self) -> OpenSessionFuture<'_>
Open a session on this manager’s datasource. Read more
Source§fn acquire_deadline(&self) -> Duration
fn acquire_deadline(&self) -> Duration
Bound for connection acquisition, normally the datasource
acquire_timeout. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SqlTransactionManager
impl !UnwindSafe for SqlTransactionManager
impl Forget for SqlTransactionManager
impl Freeze for SqlTransactionManager
impl Move for SqlTransactionManager
impl Send for SqlTransactionManager
impl Sync for SqlTransactionManager
impl Unpin for SqlTransactionManager
impl UnsafeUnpin for SqlTransactionManager
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more