Skip to main content

SnapshotLease

Struct SnapshotLease 

Source
pub struct SnapshotLease { /* private fields */ }
Expand description

One admitted read’s strong ownership of its published snapshot.

Implementations§

Source§

impl SnapshotLease

Source

pub const fn generation(&self) -> u64

Returns the active-state generation pinned when this lease was admitted.

Source

pub fn check_active(&self) -> Result<(), StoreError>

Rejects work after close has cancelled this admitted read.

Source

pub fn wait_for_close_cancellation(&self) -> Result<(), StoreError>

Blocks without polling until close cancels this admitted read.

Methods from Deref<Target = PublishedSnapshot>§

Source

pub fn generation(&self) -> u64

Returns the monotonic manifest generation published with these segments.

Source

pub fn segments(&self) -> &[SegmentReader]

Returns immutable segments belonging to the published epoch alias.

Trait Implementations§

Source§

impl Deref for SnapshotLease

Source§

type Target = PublishedSnapshot

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.