[][src]Trait couch_rs::model::Model

pub trait Model<T: Serialize + DeserializeOwned + Sized> {
    fn from_document(d: Document) -> T { ... }
fn to_document(&self) -> Document
    where
        Self: Serialize
, { ... } }

Trait that provides methods that can be used to switch between abstract Document and concrete Model implementors (such as your custom data models)

Provided methods

fn from_document(d: Document) -> T

fn to_document(&self) -> Document where
    Self: Serialize

Loading content...

Implementors

Loading content...