pub struct Metadata { /* private fields */ }Available on crate feature
metadata only.Expand description
Basic metadata for a file.
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub const fn new(
accessed: Duration,
created: Duration,
modified: Duration,
) -> Self
pub const fn new( accessed: Duration, created: Duration, modified: Duration, ) -> Self
Create a new Metadata using the number of seconds since the
SystemTime::UNIX_EPOCH.
Sourcepub fn accessed(&self) -> SystemTime
pub fn accessed(&self) -> SystemTime
Get the time this file was last accessed.
See also: std::fs::Metadata::accessed().
Sourcepub fn created(&self) -> SystemTime
pub fn created(&self) -> SystemTime
Get the time this file was created.
See also: std::fs::Metadata::created().
Sourcepub fn modified(&self) -> SystemTime
pub fn modified(&self) -> SystemTime
Get the time this file was last modified.
See also: std::fs::Metadata::modified().
Trait Implementations§
impl Copy for Metadata
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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