[][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>), Unallocated, Counter(usizePagePtr<'a, PageFrag>), Meta(&'a MetaPagePtr<'a, PageFrag>), }

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

Unallocated

This page has not been allocated yet.

Counter(usizePagePtr<'a, PageFrag>)

This page contains the last persisted counter

Meta(&'a MetaPagePtr<'a, PageFrag>)

This is the Meta page

Methods

impl<'a, P> PageGet<'a, P> where
    P: Debug + 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: &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_unallocated(&self) -> bool[src]

Returns true if the PageGet is Unallocated.

Trait Implementations

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

impl<'a, P> Sync for PageGet<'a, P> where
    P: 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, P> Send for PageGet<'a, P> where
    P: DeserializeOwned + Serialize + Send + Sync
[src]

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

Blanket Implementations

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> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?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

The type returned in the event of a conversion error.