pub struct PdfDate {
pub year: i32,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub tz_offset_minutes: Option<i16>,
}Expand description
A parsed PDF date string.
PDF dates use the format D:YYYYMMDDHHmmSSOHH'mm' where each component
after the year is optional. Truncated forms (D:2026, D:202612,
D:20261231) are accepted and produce a PdfDate with the
missing-from-the-right components defaulted to spec-correct minima
(month → 1, day → 1, hour/minute/second → 0).
Timezone offset (O) is one of +, -, Z. Z and absent both
produce tz_offset_minutes = None (UTC / unspecified).
Fields§
§year: i32§month: u8§day: u8§hour: u8§minute: u8§second: u8§tz_offset_minutes: Option<i16>Timezone offset in minutes east of UTC. None = UTC or unspecified.
Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more