use crate::features::Domain;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
pub struct ReadingSection {
domain: Domain,
title: String,
body: String,
}
impl ReadingSection {
pub fn new(domain: Domain, title: impl Into<String>, body: impl Into<String>) -> Self {
Self {
domain,
title: title.into(),
body: body.into(),
}
}
pub const fn domain(&self) -> Domain {
self.domain
}
pub fn title(&self) -> &str {
&self.title
}
pub fn body(&self) -> &str {
&self.body
}
}