pub struct SnapshotLease { /* private fields */ }Expand description
One admitted read’s strong ownership of its published snapshot.
Implementations§
Source§impl SnapshotLease
impl SnapshotLease
Sourcepub const fn generation(&self) -> u64
pub const fn generation(&self) -> u64
Returns the active-state generation pinned when this lease was admitted.
Sourcepub fn check_active(&self) -> Result<(), StoreError>
pub fn check_active(&self) -> Result<(), StoreError>
Rejects work after close has cancelled this admitted read.
Sourcepub fn wait_for_close_cancellation(&self) -> Result<(), StoreError>
pub fn wait_for_close_cancellation(&self) -> Result<(), StoreError>
Blocks without polling until close cancels this admitted read.
Methods from Deref<Target = PublishedSnapshot>§
Sourcepub fn generation(&self) -> u64
pub fn generation(&self) -> u64
Returns the monotonic manifest generation published with these segments.
Sourcepub fn segments(&self) -> &[SegmentReader]
pub fn segments(&self) -> &[SegmentReader]
Returns immutable segments belonging to the published epoch alias.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SnapshotLease
impl RefUnwindSafe for SnapshotLease
impl Send for SnapshotLease
impl Sync for SnapshotLease
impl Unpin for SnapshotLease
impl UnsafeUnpin for SnapshotLease
impl UnwindSafe for SnapshotLease
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