pub struct Metadata { /* private fields */ }Expand description
Metadata for one filesystem object.
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub const fn atime_nsec(&self) -> i64
pub const fn atime_nsec(&self) -> i64
Returns the nanosecond component of the access time.
Sourcepub const fn mtime(&self) -> i64
pub const fn mtime(&self) -> i64
Returns the modification time in seconds since the Unix epoch.
Sourcepub const fn mtime_nsec(&self) -> i64
pub const fn mtime_nsec(&self) -> i64
Returns the nanosecond component of the modification time.
Sourcepub const fn ctime(&self) -> i64
pub const fn ctime(&self) -> i64
Returns the metadata-change time in seconds since the Unix epoch.
Sourcepub const fn ctime_nsec(&self) -> i64
pub const fn ctime_nsec(&self) -> i64
Returns the nanosecond component of the metadata-change time.
Sourcepub fn unix(&self) -> Option<&UnixMetadata>
pub fn unix(&self) -> Option<&UnixMetadata>
Returns the Unix-specific metadata, if present.
Sourcepub fn windows(&self) -> Option<&WindowsMetadata>
pub fn windows(&self) -> Option<&WindowsMetadata>
Returns the Windows-specific metadata, if present.
Sourcepub const fn linux_attrs(&self) -> Option<u32>
pub const fn linux_attrs(&self) -> Option<u32>
Returns the Linux inode attributes, if present and available.
Sourcepub const fn freebsd_attrs(&self) -> Option<u32>
pub const fn freebsd_attrs(&self) -> Option<u32>
Returns the FreeBSD file flags, if present.
Sourcepub const fn macos_attrs(&self) -> Option<u32>
pub const fn macos_attrs(&self) -> Option<u32>
Returns the macOS file flags, if present.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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