From c97472914f18f4953db8e0e4d102c67ae8b2bf9d Mon Sep 17 00:00:00 2001 From: Compositr Date: Sat, 18 Jan 2025 10:02:11 +1100 Subject: [PATCH] refactor(wip): add Metadata struct --- src/mgmt.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mgmt.rs b/src/mgmt.rs index cd2457f..55e71d4 100644 --- a/src/mgmt.rs +++ b/src/mgmt.rs @@ -25,6 +25,19 @@ pub struct Inventory { pub avg_word_count: f64, } +/// Represents the front-matter metadata included within each entry. Does not necessarily have to be associated with any real diary entry. +#[derive(Debug)] +pub struct Metadata { + timestamp: String, + timezone: String, +} + +impl Metadata { + pub fn read_from_entry(contents: String) { + + } +} + /// Represents a single diary entry (markdown file) and its associated stats/metadata /// /// Does not include the actual contents of the entry, only stats