[−][src]Struct rdms::robt::Snapshot
A read only snapshot of BTree built using robt index.
Methods
impl<K, V> Snapshot<K, V> where
K: Clone + Ord + Serialize,
V: Clone + Diff + Serialize,
[src]
K: Clone + Ord + Serialize,
V: Clone + Diff + Serialize,
pub fn open(dir: &str, name: &str) -> Result<Snapshot<K, V>>
[src]
Open BTree snapshot from file that can be constructed from dir
and name
.
impl<K, V> Snapshot<K, V> where
K: Clone + Ord + Serialize,
V: Clone + Diff + Serialize,
[src]
K: Clone + Ord + Serialize,
V: Clone + Diff + Serialize,
pub fn len(&self) -> usize
[src]
Return number of entries in the snapshot.
pub fn to_seqno(&self) -> u64
[src]
Return the last seqno found in this snapshot.
pub fn to_app_meta(&self) -> Result<Vec<u8>>
[src]
Return the application metadata.
pub fn to_stats(&self) -> Result<Stats>
[src]
Return Btree statistics.
pub fn to_root(&self) -> Result<u64>
[src]
Return the file-position for Btree's root node.
Trait Implementations
impl<K, V> Footprint for Snapshot<K, V> where
K: Clone + Ord + Serialize,
V: Clone + Diff + Serialize,
[src]
K: Clone + Ord + Serialize,
V: Clone + Diff + Serialize,
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>
A writer type, that can ingest key-value pairs, associated with this index. Read more
type R = Snapshot<K, V>
A writer type, that can ingest key-value pairs, associated with this index. Read more
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 !!
impl<K, V> Reader<K, V> for Snapshot<K, V> where
K: Clone + Ord + Serialize,
V: Clone + Diff + Serialize,
<V as Diff>::D: Clone + Serialize,
[src]
K: Clone + Ord + Serialize,
V: Clone + Diff + Serialize,
<V as Diff>::D: Clone + Serialize,
fn get<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
K: Borrow<Q>,
Q: Ord,
[src]
K: Borrow<Q>,
Q: Ord,
fn iter(&self) -> Result<IndexIter<K, V>>
[src]
fn range<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + RangeBounds<Q>,
Q: 'a + Ord,
[src]
K: Borrow<Q>,
R: 'a + RangeBounds<Q>,
Q: 'a + Ord,
fn reverse<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + RangeBounds<Q>,
Q: 'a + Ord,
[src]
K: Borrow<Q>,
R: 'a + RangeBounds<Q>,
Q: 'a + Ord,
fn get_with_versions<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
K: Borrow<Q>,
Q: Ord,
[src]
K: Borrow<Q>,
Q: Ord,
fn iter_with_versions(&self) -> Result<IndexIter<K, V>>
[src]
Iterate over all entries in this index. Returned entry shall have all its previous versions, can be a costly call.
fn range_with_versions<'a, R, Q: ?Sized>(
&'a self,
range: R
) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + RangeBounds<Q>,
Q: 'a + Ord,
[src]
&'a self,
range: R
) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + RangeBounds<Q>,
Q: 'a + Ord,
Iterate from lower bound to upper bound. Returned entry shall have all its previous versions, can be a costly call.
fn reverse_with_versions<'a, R, Q: ?Sized>(
&'a self,
range: R
) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + RangeBounds<Q>,
Q: 'a + Ord,
[src]
&'a self,
range: R
) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + RangeBounds<Q>,
Q: 'a + Ord,
Iterate from upper bound to lower bound. Returned entry shall have all its previous versions, can be a costly call.
impl<K, V> Writer<K, V> for Snapshot<K, V> where
K: Clone + Ord + Serialize + Footprint,
V: Clone + Diff + Serialize + Footprint,
[src]
K: Clone + Ord + Serialize + Footprint,
V: Clone + Diff + Serialize + Footprint,
Auto Trait Implementations
impl<K, V> Send for Snapshot<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for Snapshot<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<K, V> Unpin for Snapshot<K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for Snapshot<K, V> where
K: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
V: UnwindSafe,
impl<K, V> RefUnwindSafe for Snapshot<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,