Trait authzen_core::StorageClient
source · pub trait StorageClient {
type Backend: StorageBackend;
type TransactionId: Clone + Eq + Hash + Send + Serialize + Sync;
// Required method
fn transaction_id(&self) -> Option<Self::TransactionId>;
}Expand description
A client for communicating with a storage backend. Typically this should be implemented for
connection or client implementations for that backend, e.g. diesel_async::AsyncPgConnection.
Required Associated Types§
sourcetype Backend: StorageBackend
type Backend: StorageBackend
The backend this client will act upon.
Required Methods§
sourcefn transaction_id(&self) -> Option<Self::TransactionId>
fn transaction_id(&self) -> Option<Self::TransactionId>
Returns the current transaction id if there is one available
for this client. Must return Some for clients which expect
to use a transaction cache to assist a decision maker. If
this client does not support transactions just return None.
Implementors§
source§impl<C: Db> StorageClient for C
Available on crate feature diesel-storage-backend only.
impl<C: Db> StorageClient for C
Available on crate feature
diesel-storage-backend only.