pub trait Serialized: Send + Sync {
    // Required methods
    fn collection(&self) -> CollectionName;
    fn key_description(&self) -> KeyDescription;
    fn update_policy(&self) -> ViewUpdatePolicy;
    fn version(&self) -> u64;
    fn view_name(&self) -> ViewName;
    fn map(
        &self,
        document: &BorrowedDocument<'_>
    ) -> Result<Vec<Serialized>, Error>;
    fn reduce(
        &self,
        mappings: &[(&[u8], &[u8])],
        rereduce: bool
    ) -> Result<Vec<u8>, Error>;
}
Expand description

Wraps a View with serialization to erase the associated types

Required Methods§

source

fn collection(&self) -> CollectionName

source

fn key_description(&self) -> KeyDescription

Returns the description of the view’s Key.

source

fn update_policy(&self) -> ViewUpdatePolicy

source

fn version(&self) -> u64

source

fn view_name(&self) -> ViewName

source

fn map(&self, document: &BorrowedDocument<'_>) -> Result<Vec<Serialized>, Error>

source

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

Implementors§