[][src]Enum kv::Cursor

pub enum Cursor<'a, K, V> {
    ReadOnly(RoCursor<'a>),
    ReadWrite(RwCursor<'a>),
    Phantom(Hidden<K, V>),
}

Iterable access to the database

Variants

ReadOnly(RoCursor<'a>)

Readonly access

ReadWrite(RwCursor<'a>)

Read-write access

Phantom(Hidden<K, V>)

Type information

Methods

impl<'a, K: Key, V: Value<'a>> Cursor<'a, K, V>[src]

pub fn is_read_only(&self) -> bool[src]

Returns true when the transaction is ReadOnly

pub fn iter(&mut self) -> Iter<'a, K, V>[src]

Iterate over all key/value pairs

pub fn iter_from(&mut self, key: &'a K) -> Iter<'a, K, V>[src]

Iterate over key/values pairs starting at key

pub fn set<V0: Into<V>>(&mut self, key: &'a K, value: V0) -> Result<(), Error>[src]

Insert a value at the current position

pub fn del(&mut self) -> Result<(), Error>[src]

Insert a value at the current position

pub fn get(
    &self,
    key: Option<&K>,
    op: CursorOp
) -> Result<(Option<K>, V), Error> where
    K: From<&'a [u8]>, 
[src]

Get a value from the cursor

Auto Trait Implementations

impl<'a, K, V> !Send for Cursor<'a, K, V>

impl<'a, K, V> Unpin for Cursor<'a, K, V> where
    K: Unpin,
    V: Unpin

impl<'a, K, V> !Sync for Cursor<'a, K, V>

impl<'a, K, V> UnwindSafe for Cursor<'a, K, V> where
    K: UnwindSafe,
    V: UnwindSafe

impl<'a, K, V> RefUnwindSafe for Cursor<'a, K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

Blanket Implementations

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

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

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.

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

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

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