//! Modules of information. use bincode::{Decode, Encode}; use crate::Space; /// A simple piece of data associated with a vertex. pub trait Mixin: Encode + Decode { const SPACE: Space; } /// Information needed to render a social media profile. #[derive(Encode, Decode)] pub struct Profile { pub post_count: usize, pub account_name: String, pub display_name: Option, pub about_string: Option, pub about_fields: Vec<(String, String)>, } impl Mixin for Profile { const SPACE: Space = Space("profile"); } /// Contents of a post. #[derive(Encode, Decode)] pub struct Content { pub content: Option, pub summary: Option, } impl Mixin for Content { const SPACE: Space = Space("content"); }