pub trait AsDocument: Serialize { // Provided method fn as_doc(&self) -> Result<Document> { ... } }
Convenience trait for serializing a struct into a document.