Trait Model
couch_rs::model
pub trait Model<T: TypedCouchDocument> { fn from_raw(d: Value) -> T { ... } fn to_raw(&self) -> Value where Self: Serialize, { ... } }
Trait that provides methods that can be used to switch between abstract Value and concrete Model implementors (such as your custom data models)
Value
Model
fn from_raw(d: Value) -> T
fn to_raw(&self) -> Value where Self: Serialize,