#[derive(Debug, Clone, PartialEq)]
pub struct Subject {
pub identifier: String,
pub title: String,
}
#[derive(Debug, Clone, PartialEq)]
pub struct Note {
pub about: Option<Subject>,
pub body: String,
}
#[derive(Debug, Clone, Default, PartialEq)]
pub struct Notes(Vec<Note>);
impl Notes {
pub fn len(&self) -> usize {
self.0.len()
}
pub fn is_empty(&self) -> bool {
self.0.is_empty()
}
pub fn iter(&self) -> impl Iterator<Item = &Note> {
self.0.iter()
}
pub fn push(&mut self, note: Note) {
self.0.push(note);
}
pub fn clear(&mut self) {
self.0.clear();
}
}