Struct memory_pager::Pager [] [src]

pub struct Pager {
    pub page_size: usize,
    pub pages: Vec<Option<Page>>,
    // some fields omitted
}

Memory pager instance. Manages Page instances.

Fields

The size of each page held in memory.

A vector of pages that are held in memory.

Methods

impl Pager
[src]

[src]

Create a new Pager instance with a page_size.

[src]

Create a new Pager instance with a page_size and pages. Useful to restore a Pager instance from disk.

[src]

Get a Page mutably. The page will be allocated on first access.

[src]

Get a Page wrapped in an Option enum. Does not allocate on access.

[src]

Get a mutable Page wrapped in an Option enum. Does not allocate on access.

[src]

Return the highest index number for the Pages held. Not exactly the "length" in the classical sence, but the same for all intents and purposes.

[src]

check whether the length is zero.

Trait Implementations

impl Debug for Pager
[src]

[src]

Formats the value using the given formatter. Read more

impl Default for Pager
[src]

Create a new Pager instance with a page_size of 1024.

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Pager

impl Sync for Pager