use serde::{Serialize, Deserialize}; #[derive(Serialize, Deserialize)] pub struct Entity(T); impl Entity { pub fn encode(&self) -> anyhow::Result { serde_json::to_string(&self) } }