Trait pliantdb_local::core::schema::Serialized[][src]

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

Wraps a View with serialization to erase the associated types

Required methods

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

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

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

Wraps View::name

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

Wraps View::map

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

Loading content...

Implementors

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

Loading content...