pub struct ArchiveTimestamp {
pub seconds: i64,
pub nanoseconds: u32,
}Expand description
A revision-45 timestamp represented as signed Unix seconds plus nanoseconds.
nanoseconds must be less than one billion. Writers validate this invariant
before serializing the value.
Fields§
§seconds: i64§nanoseconds: u32Implementations§
Source§impl ArchiveTimestamp
impl ArchiveTimestamp
pub const UNIX_EPOCH: Self
pub const fn from_seconds(seconds: i64) -> Self
pub const fn new(seconds: i64, nanoseconds: u32) -> Self
pub fn canonical_pax_value(self) -> Result<Vec<u8>, FormatError>
Trait Implementations§
Source§impl Clone for ArchiveTimestamp
impl Clone for ArchiveTimestamp
Source§fn clone(&self) -> ArchiveTimestamp
fn clone(&self) -> ArchiveTimestamp
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 moreimpl Copy for ArchiveTimestamp
Source§impl Debug for ArchiveTimestamp
impl Debug for ArchiveTimestamp
Source§impl Default for ArchiveTimestamp
impl Default for ArchiveTimestamp
Source§fn default() -> ArchiveTimestamp
fn default() -> ArchiveTimestamp
Returns the “default value” for a type. Read more
Source§impl Display for ArchiveTimestamp
impl Display for ArchiveTimestamp
impl Eq for ArchiveTimestamp
Source§impl Hash for ArchiveTimestamp
impl Hash for ArchiveTimestamp
Source§impl Ord for ArchiveTimestamp
impl Ord for ArchiveTimestamp
Source§fn cmp(&self, other: &ArchiveTimestamp) -> Ordering
fn cmp(&self, other: &ArchiveTimestamp) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ArchiveTimestamp
impl PartialEq for ArchiveTimestamp
Source§impl PartialOrd for ArchiveTimestamp
impl PartialOrd for ArchiveTimestamp
impl StructuralPartialEq for ArchiveTimestamp
Auto Trait Implementations§
impl Freeze for ArchiveTimestamp
impl RefUnwindSafe for ArchiveTimestamp
impl Send for ArchiveTimestamp
impl Sync for ArchiveTimestamp
impl Unpin for ArchiveTimestamp
impl UnsafeUnpin for ArchiveTimestamp
impl UnwindSafe for ArchiveTimestamp
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