Struct sherwood::Doc [-] [+] [src]

pub struct Doc {
    // some fields omitted
}

Document which was fully retrieved from db

Methods

impl Doc

fn with_key<K>(key: &K) -> FdbResult<Doc> where K: AsRef<[u8]>

Create a new document with specified key

Trait Implementations

impl DocKey for Doc

fn get_raw_key<'a>(&'a self) -> Option<&'a [u8]>

fn get_key<T: FromBytes>(&self) -> Option<T>

impl DocBody for Doc

fn set_body<B>(&mut self, body: &B) -> FdbResult<()> where B: AsRef<[u8]>

fn set_meta<M>(&mut self, meta: &M) -> FdbResult<()> where M: AsRef<[u8]>

fn get_raw_body<'a>(&'a self) -> Option<&'a [u8]>

fn get_body<T: FromBytes>(&self) -> Option<T>

impl DocMeta for Doc

fn get_raw_meta<'a>(&'a self) -> Option<&'a [u8]>

fn seq_num(&self) -> u64

Sequence number assigned to the doc

fn is_deleted(&self) -> bool

Is doc deleted?

fn offset(&self) -> u64

Offset to the doc on disk

fn get_meta<T: FromBytes>(&self) -> Option<T>