[][src]Struct heed::RwRevIter

pub struct RwRevIter<'txn, KC, DC> { /* fields omitted */ }

Implementations

impl<'txn, KC, DC> RwRevIter<'txn, KC, DC>[src]

pub fn del_current(&mut self) -> Result<bool>[src]

Delete the entry the cursor is currently pointing to.

Returns true if the entry was successfully deleted.

pub fn put_current<'a>(
    &mut self,
    key: &'a KC::EItem,
    data: &'a DC::EItem
) -> Result<bool> where
    KC: BytesEncode<'a>,
    DC: BytesEncode<'a>, 
[src]

Write a new value to the current entry. The given key must be equal to the one this cursor is pointing at.

Returns true if the entry was successfully written.

This is intended to be used when the new data is the same size as the old. Otherwise it will simply perform a delete of the old record followed by an insert.

pub fn append<'a>(
    &mut self,
    key: &'a KC::EItem,
    data: &'a DC::EItem
) -> Result<()> where
    KC: BytesEncode<'a>,
    DC: BytesEncode<'a>, 
[src]

Append the given key/value pair to the end of the database.

If a key is inserted that is less than any previous key a KeyExist error is returned and the key is not inserted into the database.

pub fn remap_types<KC2, DC2>(self) -> RwRevIter<'txn, KC2, DC2>

Notable traits for RwRevIter<'txn, KC, DC>

impl<'txn, KC, DC> Iterator for RwRevIter<'txn, KC, DC> where
    KC: BytesDecode<'txn>,
    DC: BytesDecode<'txn>, 
type Item = Result<(KC::DItem, DC::DItem)>;
[src]

Change the codec types of this iterator, specifying the codecs.

pub fn remap_key_type<KC2>(self) -> RwRevIter<'txn, KC2, DC>

Notable traits for RwRevIter<'txn, KC, DC>

impl<'txn, KC, DC> Iterator for RwRevIter<'txn, KC, DC> where
    KC: BytesDecode<'txn>,
    DC: BytesDecode<'txn>, 
type Item = Result<(KC::DItem, DC::DItem)>;
[src]

Change the key codec type of this iterator, specifying the new codec.

pub fn remap_data_type<DC2>(self) -> RwRevIter<'txn, KC, DC2>

Notable traits for RwRevIter<'txn, KC, DC>

impl<'txn, KC, DC> Iterator for RwRevIter<'txn, KC, DC> where
    KC: BytesDecode<'txn>,
    DC: BytesDecode<'txn>, 
type Item = Result<(KC::DItem, DC::DItem)>;
[src]

Change the data codec type of this iterator, specifying the new codec.

pub fn lazily_decode_data(self) -> RwRevIter<'txn, KC, LazyDecode<DC>>

Notable traits for RwRevIter<'txn, KC, DC>

impl<'txn, KC, DC> Iterator for RwRevIter<'txn, KC, DC> where
    KC: BytesDecode<'txn>,
    DC: BytesDecode<'txn>, 
type Item = Result<(KC::DItem, DC::DItem)>;
[src]

Wrap the data bytes into a lazy decoder.

Trait Implementations

impl<'txn, KC, DC> Iterator for RwRevIter<'txn, KC, DC> where
    KC: BytesDecode<'txn>,
    DC: BytesDecode<'txn>, 
[src]

type Item = Result<(KC::DItem, DC::DItem)>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'txn, KC, DC> RefUnwindSafe for RwRevIter<'txn, KC, DC> where
    DC: RefUnwindSafe,
    KC: RefUnwindSafe
[src]

impl<'txn, KC, DC> !Send for RwRevIter<'txn, KC, DC>[src]

impl<'txn, KC, DC> !Sync for RwRevIter<'txn, KC, DC>[src]

impl<'txn, KC, DC> Unpin for RwRevIter<'txn, KC, DC> where
    DC: Unpin,
    KC: Unpin
[src]

impl<'txn, KC, DC> UnwindSafe for RwRevIter<'txn, KC, DC> where
    DC: UnwindSafe,
    KC: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.