pub struct Metadata(/* private fields */);
Expand description
Metadata information about a file.
Implementations§
source§impl Metadata
impl Metadata
sourcepub const fn is_dir(&self) -> bool
pub const fn is_dir(&self) -> bool
Returns true
if this metadata is for a directory. The
result is mutually exclusive to the result of
Metadata::is_file
.
sourcepub const fn is_file(&self) -> bool
pub const fn is_file(&self) -> bool
Returns true
if this metadata is for a regular file. The
result is mutually exclusive to the result of
Metadata::is_dir
.
sourcepub const fn permissions(&self) -> Permissions
pub const fn permissions(&self) -> Permissions
Returns the permissions of the file this metadata is for.
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