pub struct TransactionManager { /* private fields */ }Expand description
Transaction manager for coordinating encrypted operations
Implementations§
Source§impl TransactionManager
impl TransactionManager
Sourcepub fn begin(
&mut self,
context: TransactionContext,
) -> Result<String, SecretsError>
pub fn begin( &mut self, context: TransactionContext, ) -> Result<String, SecretsError>
Begin transaction
Sourcepub fn get_transaction(&self, txn_id: &str) -> Option<&TransactionContext>
pub fn get_transaction(&self, txn_id: &str) -> Option<&TransactionContext>
Get active transaction
Sourcepub fn get_transaction_mut(
&mut self,
txn_id: &str,
) -> Option<&mut TransactionContext>
pub fn get_transaction_mut( &mut self, txn_id: &str, ) -> Option<&mut TransactionContext>
Get mutable transaction reference
Sourcepub fn savepoint(
&mut self,
txn_id: &str,
name: impl Into<String>,
) -> Result<(), SecretsError>
pub fn savepoint( &mut self, txn_id: &str, name: impl Into<String>, ) -> Result<(), SecretsError>
Create savepoint
Sourcepub fn rollback_to_savepoint(
&mut self,
txn_id: &str,
name: &str,
) -> Result<(), SecretsError>
pub fn rollback_to_savepoint( &mut self, txn_id: &str, name: &str, ) -> Result<(), SecretsError>
Rollback to savepoint
Sourcepub fn active_transactions(&self) -> Vec<&str>
pub fn active_transactions(&self) -> Vec<&str>
Get list of active transaction IDs
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Count active transactions
Sourcepub fn cleanup_completed(&mut self)
pub fn cleanup_completed(&mut self)
Clear completed transactions
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TransactionManager
impl RefUnwindSafe for TransactionManager
impl Send for TransactionManager
impl Sync for TransactionManager
impl Unpin for TransactionManager
impl UnwindSafe for TransactionManager
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().