natter/src/intermediate/timestamp.rs

24 lines
576 B
Rust
Raw Normal View History

use super::macros::intermediate;
use super::util::coalesce_whitespace;
2023-12-21 14:56:58 -05:00
use crate::error::CustomError;
use organic::types::StandardProperties;
2023-10-27 17:48:19 -04:00
#[derive(Debug, Clone)]
pub(crate) struct ITimestamp {
pub(crate) source: String,
pub(crate) post_blank: organic::types::PostBlank,
}
intermediate!(
ITimestamp,
&'orig organic::types::Timestamp<'parse>,
original,
_intermediate_context,
{
Ok(ITimestamp {
source: coalesce_whitespace(original.source).into_owned(),
post_blank: original.get_post_blank(),
})
}
);