Trait pliantdb_core::schema::view::Serialized[][src]

pub trait Serialized: Send + Sync + Debug {
    fn collection(&self) -> Id;
fn version(&self) -> u64;
fn name(&self) -> Cow<'static, str>;
fn map(&self, document: &Document<'_>) -> Result<Option<Serialized>, Error>;
fn reduce(
        &self,
        mappings: &[(&[u8], &[u8])],
        rereduce: bool
    ) -> Result<Vec<u8>, Error>; }

Wraps a View with serialization to erase the associated types

Required methods

fn collection(&self) -> Id[src]

fn version(&self) -> u64[src]

fn name(&self) -> Cow<'static, str>[src]

Wraps View::name

fn map(&self, document: &Document<'_>) -> Result<Option<Serialized>, Error>[src]

Wraps View::map

fn reduce(
    &self,
    mappings: &[(&[u8], &[u8])],
    rereduce: bool
) -> Result<Vec<u8>, Error>
[src]

Loading content...

Implementors

impl<T> Serialized for T where
    T: View,
    <T as View>::Key: 'static, 
[src]

Loading content...