[][src]Trait kv::Key

pub trait Key<'a>: Sized + AsRef<[u8]> {
    fn from_raw_key(r: &'a Raw) -> Result<Self, Error>;

    fn to_raw_key(&self) -> Result<Raw, Error> { ... }
}

A Key can be used as a key to a database

Required methods

fn from_raw_key(r: &'a Raw) -> Result<Self, Error>

Convert from Raw

Loading content...

Provided methods

fn to_raw_key(&self) -> Result<Raw, Error>

Wrapper around AsRef<u8>

Loading content...

Implementations on Foreign Types

impl<'a> Key<'a> for &'a [u8][src]

impl<'a> Key<'a> for &'a str[src]

impl<'a> Key<'a> for Vec<u8>[src]

impl<'a> Key<'a> for String[src]

Loading content...

Implementors

impl<'a> Key<'a> for Integer[src]

impl<'a> Key<'a> for Raw[src]

Loading content...