Implement the new fields for clock.

This commit is contained in:
Tom Alexander
2023-12-15 10:49:04 -05:00
parent 68a220aa1c
commit d6232dc49c
2 changed files with 9 additions and 3 deletions

View File

@@ -124,6 +124,7 @@ pub struct Clock<'s> {
pub timestamp: Timestamp<'s>,
pub duration: Option<&'s str>,
pub status: ClockStatus,
pub post_blank: Option<&'s str>,
}
#[derive(Debug)]
@@ -351,11 +352,15 @@ impl<'s> StandardProperties<'s> for Clock<'s> {
}
fn get_contents<'b>(&'b self) -> Option<&'s str> {
todo!()
None
}
fn get_post_blank(&self) -> PostBlank {
todo!()
self.post_blank
.map(|text| text.lines().count())
.unwrap_or(0)
.try_into()
.expect("Too much post-blank to fit into a PostBlank.")
}
}