Enum pagecache::PageGet [−][src]
pub enum PageGet<'a, PageFrag> where
PageFrag: 'static + DeserializeOwned + Serialize + Send + Sync, { Materialized(PageFrag, PagePtr<'a, PageFrag>), Free(PagePtr<'a, PageFrag>), Allocated, Unallocated, }
The result of a get
call in the PageCache
.
Variants
Materialized(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]
impl<'a, P> PageGet<'a, P> where
P: DeserializeOwned + Serialize + Send + Sync,
pub fn unwrap(self) -> (P, PagePtr<'a, P>)
[src]
pub fn unwrap(self) -> (P, PagePtr<'a, P>)
unwraps the PageGet
into its inner Materialized
form.
Panics
Panics if it is a variant other than Materialized.
pub fn is_materialized(&self) -> bool
[src]
pub fn is_materialized(&self) -> bool
Returns true if the PageGet
is Materialized
.
pub fn is_free(&self) -> bool
[src]
pub fn is_free(&self) -> bool
Returns true if the PageGet
is Free
.
pub fn is_allocated(&self) -> bool
[src]
pub fn is_allocated(&self) -> bool
Returns true if the PageGet
is Allocated
.
pub fn is_unallocated(&self) -> bool
[src]
pub fn is_unallocated(&self) -> bool
Returns true if the PageGet
is Unallocated
.
Trait Implementations
impl<'a, PageFrag: Clone> Clone 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,
fn clone(&self) -> PageGet<'a, PageFrag>
[src]
fn clone(&self) -> PageGet<'a, PageFrag>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a, PageFrag: Debug> Debug for PageGet<'a, PageFrag> where
PageFrag: 'static + DeserializeOwned + Serialize + Send + Sync,
[src]
impl<'a, PageFrag: Debug> Debug for PageGet<'a, PageFrag> where
PageFrag: 'static + DeserializeOwned + Serialize + Send + Sync,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, PageFrag: PartialEq> PartialEq for PageGet<'a, PageFrag> where
PageFrag: 'static + DeserializeOwned + Serialize + Send + Sync,
[src]
impl<'a, PageFrag: PartialEq> PartialEq for PageGet<'a, PageFrag> where
PageFrag: 'static + DeserializeOwned + Serialize + Send + Sync,
fn eq(&self, other: &PageGet<'a, PageFrag>) -> bool
[src]
fn eq(&self, other: &PageGet<'a, PageFrag>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &PageGet<'a, PageFrag>) -> bool
[src]
fn ne(&self, other: &PageGet<'a, PageFrag>) -> bool
This method tests for !=
.
impl<'a, P> Send for PageGet<'a, P> where
P: DeserializeOwned + Serialize + Send + Sync,
[src]
impl<'a, P> Send for PageGet<'a, P> where
P: DeserializeOwned + Serialize + Send + Sync,
impl<'a, P> Sync 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,