pub struct ZipDateTime { /* private fields */ }Expand description
A date and time stored as per the MS-DOS representation used by ZIP files.
Implementations§
Source§impl ZipDateTime
impl ZipDateTime
Sourcepub fn default_for_write() -> Self
pub fn default_for_write() -> Self
Returns the current time if the jiff feature is enabled, otherwise the default of 1980-01-01.
Sourcepub fn second(&self) -> u32
pub fn second(&self) -> u32
Returns the second of this date & time.
Note that MS-DOS has a maximum granularity of two seconds.
Sourcepub fn as_jiff(&self) -> Result<DateTime, Error>
Available on crate feature jiff only.
pub fn as_jiff(&self) -> Result<DateTime, Error>
jiff only.Constructs Jiff’s civil::DateTime representation of this date & time.
Note that this requires the jiff feature.
Sourcepub fn from_jiff(date_time: &DateTime) -> Self
Available on crate feature jiff only.
pub fn from_jiff(date_time: &DateTime) -> Self
jiff only.Constructs this date & time from Jiff’s civil::DateTime representation.
Note that this requires the jiff feature.
Trait Implementations§
Source§impl Clone for ZipDateTime
impl Clone for ZipDateTime
Source§fn clone(&self) -> ZipDateTime
fn clone(&self) -> ZipDateTime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZipDateTime
impl Debug for ZipDateTime
Source§impl Default for ZipDateTime
impl Default for ZipDateTime
Source§impl From<&DateTime> for ZipDateTime
Available on crate feature jiff only.
impl From<&DateTime> for ZipDateTime
Available on crate feature
jiff only.Source§impl From<DateTime> for ZipDateTime
Available on crate feature jiff only.
impl From<DateTime> for ZipDateTime
Available on crate feature
jiff only.Source§impl From<ZipDateTime> for ZipDateTimeBuilder
impl From<ZipDateTime> for ZipDateTimeBuilder
Source§fn from(date: ZipDateTime) -> Self
fn from(date: ZipDateTime) -> Self
Converts to this type from the input type.
Source§impl From<ZipDateTimeBuilder> for ZipDateTime
impl From<ZipDateTimeBuilder> for ZipDateTime
Source§fn from(builder: ZipDateTimeBuilder) -> Self
fn from(builder: ZipDateTimeBuilder) -> Self
Converts to this type from the input type.
Source§impl Hash for ZipDateTime
impl Hash for ZipDateTime
Source§impl PartialEq for ZipDateTime
impl PartialEq for ZipDateTime
Source§fn eq(&self, other: &ZipDateTime) -> bool
fn eq(&self, other: &ZipDateTime) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TryFrom<&ZipDateTime> for DateTime
Available on crate feature jiff only.
impl TryFrom<&ZipDateTime> for DateTime
Available on crate feature
jiff only.Source§impl TryFrom<ZipDateTime> for DateTime
Available on crate feature jiff only.
impl TryFrom<ZipDateTime> for DateTime
Available on crate feature
jiff only.impl Copy for ZipDateTime
impl Eq for ZipDateTime
impl StructuralPartialEq for ZipDateTime
Auto Trait Implementations§
impl Freeze for ZipDateTime
impl RefUnwindSafe for ZipDateTime
impl Send for ZipDateTime
impl Sync for ZipDateTime
impl Unpin for ZipDateTime
impl UnsafeUnpin for ZipDateTime
impl UnwindSafe for ZipDateTime
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