Trait sherwood::DocBody [-] [+] [src]

pub trait DocBody {
    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> { ... }
}

Trait for accessing document body

Required Methods

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

Sets document body, data is copied

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

Sets document meta, data is copied

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

Retrieves body as raw bytes

Provided Methods

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

Converts body

Implementors