[−][src]Struct rdms::Rdms
Index keys and corresponding values. Check module documentation for the full set of features.
Methods
impl<K, V, M, D> Rdms<K, V, M, D> where
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
M: Index<K, V>,
D: Index<K, V>,
[src]
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
M: Index<K, V>,
D: Index<K, V>,
pub fn new<S>(
name: S,
mem: M,
disk: D,
config: Config
) -> Result<Rdms<K, V, M, D>> where
S: AsRef<str>,
[src]
name: S,
mem: M,
disk: D,
config: Config
) -> Result<Rdms<K, V, M, D>> where
S: AsRef<str>,
impl<K, V, M, D> Rdms<K, V, M, D> where
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
M: Index<K, V>,
D: Index<K, V>,
[src]
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
M: Index<K, V>,
D: Index<K, V>,
impl<K, V, M, D> Rdms<K, V, M, D> where
K: 'static + Clone + Ord + Footprint,
V: 'static + Clone + Diff + Footprint,
M: Index<K, V> + Reader<K, V>,
D: Index<K, V> + Reader<K, V>,
[src]
K: 'static + Clone + Ord + Footprint,
V: 'static + Clone + Diff + Footprint,
M: Index<K, V> + Reader<K, V>,
D: Index<K, V> + Reader<K, V>,
pub fn get<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
K: Borrow<Q>,
Q: Ord,
[src]
K: Borrow<Q>,
Q: Ord,
Get key
from index.
pub fn iter(&self) -> Result<IndexIter<K, V>>
[src]
Iterate over all entries in this index.
pub fn range<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + Clone + RangeBounds<Q>,
Q: 'a + Ord,
[src]
K: Borrow<Q>,
R: 'a + Clone + RangeBounds<Q>,
Q: 'a + Ord,
Iterate from lower bound to upper bound.
pub fn reverse<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + Clone + RangeBounds<Q>,
Q: 'a + Ord,
[src]
K: Borrow<Q>,
R: 'a + Clone + RangeBounds<Q>,
Q: 'a + Ord,
Iterate from upper bound to lower bound.
impl<K, V, M, D> Rdms<K, V, M, D> where
K: 'static + Clone + Ord + Footprint,
V: 'static + Clone + Diff + From<<V as Diff>::D> + Footprint,
M: Index<K, V> + Reader<K, V>,
D: Index<K, V> + Reader<K, V>,
[src]
K: 'static + Clone + Ord + Footprint,
V: 'static + Clone + Diff + From<<V as Diff>::D> + Footprint,
M: Index<K, V> + Reader<K, V>,
D: Index<K, V> + Reader<K, V>,
pub 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,
pub fn iter_with_versions(&self) -> Result<IndexIter<K, V>>
[src]
pub fn range_with_versions<'a, R, Q: ?Sized>(
&'a self,
range: R
) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + Clone + RangeBounds<Q>,
Q: 'a + Ord,
[src]
&'a self,
range: R
) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + Clone + RangeBounds<Q>,
Q: 'a + Ord,
pub fn reverse_with_versions<'a, R, Q: ?Sized>(
&'a self,
range: R
) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + Clone + RangeBounds<Q>,
Q: 'a + Ord,
[src]
&'a self,
range: R
) -> Result<IndexIter<K, V>> where
K: Borrow<Q>,
R: 'a + Clone + RangeBounds<Q>,
Q: 'a + Ord,
impl<K, V, M, D> Rdms<K, V, M, D> where
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
M: Index<K, V> + Writer<K, V>,
D: Index<K, V>,
[src]
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
M: Index<K, V> + Writer<K, V>,
D: Index<K, V>,
pub fn set(&mut self, key: K, value: V) -> Result<Option<Entry<K, V>>>
[src]
Set {key, value} in index. Return older entry if present.
pub fn set_cas(
&mut self,
key: K,
value: V,
cas: u64
) -> Result<Option<Entry<K, V>>>
[src]
&mut self,
key: K,
value: V,
cas: u64
) -> Result<Option<Entry<K, V>>>
Set {key, value} in index if an older entry exists with the
same cas
value. To create a fresh entry, pass cas
as ZERO.
Return the older entry if present.
pub fn delete<Q: ?Sized>(&mut self, key: &Q) -> Result<Option<Entry<K, V>>> where
K: Borrow<Q>,
Q: ToOwned<Owned = K> + Ord,
[src]
K: Borrow<Q>,
Q: ToOwned<Owned = K> + Ord,
Delete key from DB. Return the entry if it is already present.
impl<K, V, M, D> Rdms<K, V, M, D> where
K: Clone + Ord + Debug + Footprint,
V: Clone + Diff + Footprint,
M: Index<K, V>,
D: Index<K, V>,
[src]
K: Clone + Ord + Debug + Footprint,
V: Clone + Diff + Footprint,
M: Index<K, V>,
D: Index<K, V>,
Auto Trait Implementations
impl<K, V, M, D> Send for Rdms<K, V, M, D> where
D: Send,
K: Send,
M: Send,
V: Send,
D: Send,
K: Send,
M: Send,
V: Send,
impl<K, V, M, D> Sync for Rdms<K, V, M, D> where
D: Sync,
K: Sync,
M: Sync,
V: Sync,
D: Sync,
K: Sync,
M: Sync,
V: Sync,
impl<K, V, M, D> Unpin for Rdms<K, V, M, D> where
D: Unpin,
K: Unpin,
M: Unpin,
V: Unpin,
D: Unpin,
K: Unpin,
M: Unpin,
V: Unpin,
impl<K, V, M, D> UnwindSafe for Rdms<K, V, M, D> where
D: UnwindSafe,
K: UnwindSafe,
M: UnwindSafe,
V: UnwindSafe,
D: UnwindSafe,
K: UnwindSafe,
M: UnwindSafe,
V: UnwindSafe,
impl<K, V, M, D> RefUnwindSafe for Rdms<K, V, M, D> where
D: RefUnwindSafe,
K: RefUnwindSafe,
M: RefUnwindSafe,
V: RefUnwindSafe,
D: RefUnwindSafe,
K: RefUnwindSafe,
M: 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,