use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct InboxItem {
pub title: String,
pub tags: Vec<String>,
pub body: Option<String>,
#[serde(skip)]
pub source_text: Option<Vec<String>>,
#[serde(skip)]
pub dirty: bool,
}
impl InboxItem {
pub fn new(title: String) -> Self {
InboxItem {
title,
tags: Vec::new(),
body: None,
source_text: None,
dirty: true,
}
}
}
#[derive(Debug, Clone)]
pub struct Inbox {
pub header_lines: Vec<String>,
pub items: Vec<InboxItem>,
pub source_lines: Vec<String>,
}