mongo_orm/
entity.rs

1use bson::Document;
2
3pub trait MongoEntity:  Unpin + Send + Sync {
4    fn to_document(&self) -> Document;
5
6    /// Create the struct from a BSON document
7    fn from_document(doc: Document) -> Self;
8}