[][src]Enum pagecache::PageGet

pub enum PageGet<'a, PageFrag> where
    PageFrag: 'static + DeserializeOwned + Serialize + Send + Sync
{ Materialized(&'a PageFrag, PagePtr<'a, PageFrag>), Free(PagePtr<'a, PageFrag>), Allocated, Unallocated, }

The result of a get call in the PageCache.

Variants

Materialized(&'a PageFrag, PagePtr<'a, PageFrag>)

This page contains data and has been prepared for presentation to the caller by the PageCache's Materializer.

Free(PagePtr<'a, PageFrag>)

This page has been Freed

Allocated

This page has been allocated, but will become Free after restarting the system unless some data gets written to it.

Unallocated

This page was never allocated.

Methods

impl<'a, P> PageGet<'a, P> where
    P: DeserializeOwned + Serialize + Send + Sync
[src]

pub fn unwrap(self) -> (&'a P, PagePtr<'a, P>)
[src]

unwraps the PageGet into its inner Materialized form.

Panics

Panics if it is a variant other than Materialized.

pub fn expect(self, msg: &'static str) -> (&'a P, PagePtr<'a, P>)
[src]

unwraps the PageGet into its inner Materialized form, or panics with the specified error message.

Panics

Panics if it is a variant other than Materialized.

pub fn is_materialized(&self) -> bool
[src]

Returns true if the PageGet is Materialized.

pub fn is_free(&self) -> bool
[src]

Returns true if the PageGet is Free.

pub fn is_allocated(&self) -> bool
[src]

Returns true if the PageGet is Allocated.

pub fn is_unallocated(&self) -> bool
[src]

Returns true if the PageGet is Unallocated.

Trait Implementations

impl<'a, P> Send for PageGet<'a, P> where
    P: DeserializeOwned + Serialize + Send + Sync
[src]

impl<'a, P> Sync for PageGet<'a, P> where
    P: DeserializeOwned + Serialize + Send + Sync
[src]

impl<'a, PageFrag: PartialEq> PartialEq<PageGet<'a, PageFrag>> for PageGet<'a, PageFrag> where
    PageFrag: 'static + DeserializeOwned + Serialize + Send + Sync
[src]

impl<'a, PageFrag: Clone> Clone for PageGet<'a, PageFrag> where
    PageFrag: 'static + DeserializeOwned + Serialize + Send + Sync
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a, PageFrag: Debug> Debug for PageGet<'a, PageFrag> where
    PageFrag: 'static + DeserializeOwned + Serialize + Send + Sync
[src]

Blanket Implementations

impl<T> From for T
[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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]