Struct memory_pager::Pager[][src]

pub struct Pager { /* fields omitted */ }

Memory pager instance. Manages Page instances.

Methods

impl Pager
[src]

Create a new Pager instance with a page_size.

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

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

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

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

The number of pages held by memory-pager. Doesn't account for empty entries. Comparable to vec.len() in usage.

check whether the length is zero.

Get the memory page size in bytes.

Important traits for Iter<'a>

Iterate over &Pages.

Trait Implementations

impl Debug for Pager
[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.

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

Auto Trait Implementations

impl Send for Pager

impl Sync for Pager