Compare timestamp type.

This commit is contained in:
Tom Alexander
2023-10-02 13:33:00 -04:00
parent 06ecf41663
commit d04c8c832c
4 changed files with 42 additions and 3 deletions

View File

@@ -75,6 +75,7 @@ pub use object::Subscript;
pub use object::Superscript;
pub use object::Target;
pub use object::Timestamp;
pub use object::TimestampType;
pub use object::Underline;
pub use object::Verbatim;
pub(crate) use source::SetSource;

View File

@@ -1,6 +1,7 @@
use super::GetStandardProperties;
use super::StandardProperties;
// TODO: Why did we make Object implement PartialEq again? Was it just for tests?
#[derive(Debug, PartialEq)]
pub enum Object<'s> {
Bold(Bold<'s>),
@@ -184,6 +185,16 @@ pub struct Superscript<'s> {
#[derive(Debug, PartialEq)]
pub struct Timestamp<'s> {
pub source: &'s str,
pub timestamp_type: TimestampType,
}
#[derive(Debug, PartialEq)]
pub enum TimestampType {
Diary,
Active,
Inactive,
ActiveRange,
InactiveRange,
}
impl<'s> GetStandardProperties<'s> for Object<'s> {