Implement the new fields for timestamp.

This commit is contained in:
Tom Alexander
2023-12-11 14:18:04 -05:00
parent 68dccd54b1
commit 87ce7d7432
2 changed files with 21 additions and 9 deletions

View File

@@ -299,6 +299,7 @@ pub struct Timestamp<'s> {
pub end_time: Option<Time<'s>>,
pub repeater: Option<Repeater>,
pub warning_delay: Option<WarningDelay>,
pub post_blank: Option<&'s str>,
}
#[derive(Debug, Clone)]
@@ -964,11 +965,15 @@ impl<'s> StandardProperties<'s> for Timestamp<'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.chars().count())
.unwrap_or(0)
.try_into()
.expect("Too much post-blank to fit into a PostBlank.")
}
}