[][src]Struct pagecache::Reservation

pub struct Reservation<'a> { /* fields omitted */ }

A pending log reservation which can be aborted or completed. NB the holder should quickly call complete or abort as taking too long to decide will cause the underlying IO buffer to become blocked.

Methods

impl<'a> Reservation<'a>
[src]

pub fn abort(self) -> Result<(Lsn, DiskPtr), ()>
[src]

Cancel the reservation, placing a failed flush on disk, returning the (cancelled) log sequence number and file offset.

pub fn complete(self) -> Result<(Lsn, DiskPtr), ()>
[src]

Complete the reservation, placing the buffer on disk. returns the log sequence number of the write, and the file offset.

pub fn lid(&self) -> LogId
[src]

Get the log file offset for reading this buffer in the future.

pub fn lsn(&self) -> Lsn
[src]

Get the log sequence number for this update.

pub fn ptr(&self) -> DiskPtr
[src]

Get the underlying storage location for the written value. Note that an blob write still has a pointer in the log at the provided lid location.

Trait Implementations

impl<'a> Drop for Reservation<'a>
[src]

Auto Trait Implementations

impl<'a> Send for Reservation<'a>

impl<'a> Sync for Reservation<'a>

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]