pub struct PdfDate {
pub year: u16,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
}Expand description
A UTC timestamp for /CreationDate//ModDate. Always an explicit
caller-supplied value, never read from the system clock: wasm32-unknown-unknown
has none, and reproducible output (same Document -> byte-identical
PDF) is a feature, not an accident.
Fields§
§year: u16§month: u8§day: u8§hour: u8§minute: u8§second: u8Implementations§
Source§impl PdfDate
impl PdfDate
pub fn new( year: u16, month: u8, day: u8, hour: u8, minute: u8, second: u8, ) -> Self
Sourcepub fn to_pdf_string(self) -> String
pub fn to_pdf_string(self) -> String
D:YYYYMMDDHHmmSSZ — the PDF date string format (ISO/IEC 32000-1
7.9.4), UTC only (no offset support needed here).
Sourcepub fn to_xmp_string(self) -> String
pub fn to_xmp_string(self) -> String
ISO 8601, as XMP (xmp:CreateDate/xmp:ModifyDate) wants it — the
same fields as to_pdf_string, just reordered/repunctuated, not a
second date representation (issue #25).
Trait Implementations§
impl Copy for PdfDate
impl Eq for PdfDate
impl StructuralPartialEq for PdfDate
Auto Trait Implementations§
impl Freeze for PdfDate
impl RefUnwindSafe for PdfDate
impl Send for PdfDate
impl Sync for PdfDate
impl Unpin for PdfDate
impl UnsafeUnpin for PdfDate
impl UnwindSafe for PdfDate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more