pub struct OwnedReadSession { /* private fields */ }Expand description
A read-only session that owns a transaction until a stream terminal action releases it.
Implementations§
Source§impl OwnedReadSession
impl OwnedReadSession
Sourcepub fn new(
transaction: Box<dyn OwnedKVTransaction>,
) -> Result<OwnedReadSession, Error>
pub fn new( transaction: Box<dyn OwnedKVTransaction>, ) -> Result<OwnedReadSession, Error>
Wrap a backend-owned read-only transaction.
Sourcepub fn status(&self) -> OwnedReadSessionStatus
pub fn status(&self) -> OwnedReadSessionStatus
Return the current lifecycle state.
Sourcepub fn acquire_lease(&self) -> Result<OwnedReadLease, Error>
pub fn acquire_lease(&self) -> Result<OwnedReadLease, Error>
Acquire the only lease allowed to advance this read session.
Sourcepub fn close(&self) -> Result<OwnedReadSessionStatus, Error>
pub fn close(&self) -> Result<OwnedReadSessionStatus, Error>
Close this session. Closing is idempotent after any terminal state.
Trait Implementations§
Source§impl Clone for OwnedReadSession
impl Clone for OwnedReadSession
Source§fn clone(&self) -> OwnedReadSession
fn clone(&self) -> OwnedReadSession
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 moreSource§impl Debug for OwnedReadSession
impl Debug for OwnedReadSession
Source§impl OwnedReadSessionApi for OwnedReadSession
impl OwnedReadSessionApi for OwnedReadSession
Source§fn status(&self) -> OwnedReadSessionStatus
fn status(&self) -> OwnedReadSessionStatus
Return the current one-way lifecycle state.
Source§fn acquire_lease(&self) -> Result<OwnedReadLease, Error>
fn acquire_lease(&self) -> Result<OwnedReadLease, Error>
Acquire the only lease that may advance this session’s transaction/cursors.
Auto Trait Implementations§
impl Freeze for OwnedReadSession
impl RefUnwindSafe for OwnedReadSession
impl Send for OwnedReadSession
impl Sync for OwnedReadSession
impl Unpin for OwnedReadSession
impl UnsafeUnpin for OwnedReadSession
impl UnwindSafe for OwnedReadSession
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