pub struct Metadata { /* private fields */ }
Expand description
Metadata information about a file or a directory.
This structure is returned from the File::metadata
and
Repo::metadata
represents known metadata about a file such as its type,
size, modification times and etc.
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn content_len(&self) -> usize
pub fn content_len(&self) -> usize
Returns the size of the current version of file, in bytes, this metadata is for.
Sourcepub fn curr_version(&self) -> usize
pub fn curr_version(&self) -> usize
Returns current version number of file listed in this metadata.
Sourcepub fn created_at(&self) -> SystemTime
pub fn created_at(&self) -> SystemTime
Returns the creation time listed in this metadata.
Sourcepub fn modified_at(&self) -> SystemTime
pub fn modified_at(&self) -> SystemTime
Returns the last modification time listed in this metadata.
Trait Implementations§
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