pub struct VersionedBackend<B> { /* private fields */ }Expand description
A backend adapter that opens a tick for every write (one per interactive transaction), and hands out capabilities matching the store’s level. Stores wrap their backend in it.
Implementations§
Source§impl<B> VersionedBackend<B>
impl<B> VersionedBackend<B>
pub fn new(inner: B, caps: &Capabilities, level: Versioning) -> Self
pub fn inner(&self) -> &B
pub fn level(&self) -> Versioning
pub fn set_level(&self, level: Versioning)
Sourcepub fn set_commit_info(&self, info: CommitInfo)
pub fn set_commit_info(&self, info: CommitInfo)
Author and message recorded on the ticks of later writes (until changed).
pub fn commit_info(&self) -> CommitInfo
Trait Implementations§
Source§impl<B: AsyncBackend> AsyncBackend for VersionedBackend<B>
impl<B: AsyncBackend> AsyncBackend for VersionedBackend<B>
async fn execute(&self, request: &Request) -> Result<Response>
fn capabilities(&self) -> &Capabilities
Source§impl<B: SyncBackend> SyncBackend for VersionedBackend<B>
impl<B: SyncBackend> SyncBackend for VersionedBackend<B>
fn execute(&self, request: &Request) -> Result<Response>
fn capabilities(&self) -> &Capabilities
Source§fn begin(&self) -> Result<()>
fn begin(&self) -> Result<()>
Starts an interactive transaction (savepoint). Only for backends with
interactive_transactions.fn commit(&self) -> Result<()>
fn rollback(&self) -> Result<()>
Auto Trait Implementations§
impl<B> !Freeze for VersionedBackend<B>
impl<B> RefUnwindSafe for VersionedBackend<B>where
B: RefUnwindSafe,
impl<B> Send for VersionedBackend<B>where
B: Send,
impl<B> Sync for VersionedBackend<B>where
B: Sync,
impl<B> Unpin for VersionedBackend<B>where
B: Unpin,
impl<B> UnsafeUnpin for VersionedBackend<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for VersionedBackend<B>where
B: UnwindSafe,
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