[−][src]Trait rdms::Index
Index trait implemented by Rdms's underlying data-structures that can ingest key, value pairs.
Associated Types
type W: Writer<K, V>
A writer type, that can ingest key-value pairs, associated with this index.
type R: Reader<K, V>
A writer type, that can ingest key-value pairs, associated with this index.
Required methods
fn make_new(&self) -> Result<Box<Self>>
Make a new empty index of this type, with same configuration.
fn to_reader(&mut self) -> Result<Self::R>
Create a new read handle, for multi-threading. Note that not all indexes allow concurrent readers. Refer to index API for more details.
fn to_writer(&mut self) -> Result<Self::W>
Create a new write handle, for multi-threading. Note that not all indexes allow concurrent writers. Refer to index API for more details.
Implementors
impl<K, V> Index<K, V> for Llrb<K, V> where
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
[src]
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
type W = LlrbWriter<K, V>
type R = LlrbReader<K, V>
fn make_new(&self) -> Result<Box<Self>>
[src]
Make a new empty index of this type, with same configuration.
fn to_reader(&mut self) -> Result<Self::R>
[src]
Create a new reader handle, for multi-threading. Llrb uses spin-lock to coordinate between readers and writers.
fn to_writer(&mut self) -> Result<Self::W>
[src]
Create a new writer handle, for multi-threading. Llrb uses spin-lock to coordinate between readers and writers.
impl<K, V> Index<K, V> for Mvcc<K, V> where
K: 'static + Send + Clone + Ord + Footprint,
V: 'static + Send + Clone + Diff + Footprint,
<V as Diff>::D: Send,
[src]
K: 'static + Send + Clone + Ord + Footprint,
V: 'static + Send + Clone + Diff + Footprint,
<V as Diff>::D: Send,
type W = MvccWriter<K, V>
type R = MvccReader<K, V>
fn make_new(&self) -> Result<Box<Self>>
[src]
Make a new empty index of this type, with same configuration.
fn to_reader(&mut self) -> Result<Self::R>
[src]
Lockless concurrent readers are supported
fn to_writer(&mut self) -> Result<Self::W>
[src]
Create a new writer handle. Multiple writers uses spin-lock to serialize write operation.
impl<K, V> Index<K, V> for NoDisk<K, V> where
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
[src]
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
type W = NoDisk<K, V>
type R = NoDisk<K, V>
fn make_new(&self) -> Result<Box<Self>>
[src]
fn to_reader(&mut self) -> Result<Self::R>
[src]
fn to_writer(&mut self) -> Result<Self::W>
[src]
impl<K, V> Index<K, V> for Snapshot<K, V> where
K: Clone + Ord + Serialize + Footprint,
V: Clone + Diff + Serialize + Footprint,
<V as Diff>::D: Serialize,
[src]
K: Clone + Ord + Serialize + Footprint,
V: Clone + Diff + Serialize + Footprint,
<V as Diff>::D: Serialize,
type W = Snapshot<K, V>
type R = Snapshot<K, V>
fn make_new(&self) -> Result<Box<Self>>
[src]
Make a new empty index of this type, with same configuration.
fn to_reader(&mut self) -> Result<Self::R>
[src]
Create a new read handle, for multi-threading.
fn to_writer(&mut self) -> Result<Self::W>
[src]
writes not allowed !!