Struct rustdb::pstore::Stash[][src]

pub struct Stash {
    pub time: u64,
    pub pages: HashMap<u64, PageInfoPtr>,
    pub readers: BTreeMap<u64, usize>,
    pub updates: BTreeMap<u64, HashSet<u64>>,
}
Expand description

Central store of data.

Fields

time: u64

Write time - number of writes.

pages: HashMap<u64, PageInfoPtr>

Page number -> page info.

readers: BTreeMap<u64, usize>

Time -> reader count.

updates: BTreeMap<u64, HashSet<u64>>

Time -> set of page numbers.

Implementations

Set the value of the specified page for the current time.

Get the PageInfoPtr for the specified page.

Register that there is a client reading the database. The result is the current time.

Register that the read at the specified time has ended. Stashed pages may be freed.

Register that an update operation has completed. Time is incremented. Stashed pages may be freed.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.