1 2 3 4 5 6
use bson::oid::ObjectId; pub trait BaseDocument { fn set_id(&self, id: Option<ObjectId>); fn get_id(&self) -> Option<ObjectId>; }