pub struct Metadata { /* private fields */ }
Expand description

A container for the UnixFs metadata, which can be present at the root of the file, directory, or symlink trees.

Implementations

Returns the full file mode, if one has been specified.

The full file mode is originally read through st_mode field of stat struct defined in sys/stat.h and its defining OpenGroup standard. The lowest 3 bytes correspond to read, write, and execute rights per user, group, and other, while the 4th byte determines sticky bits, set user id or set group id. The following two bytes correspond to the different file types, as defined by the same OpenGroup standard: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html

Returns the raw timestamp of last modification time, if specified.

The timestamp is (seconds, nanos) - similar to core::time::Duration, with the exception of allowing seconds to be negative. The seconds are calculated from 1970-01-01 00:00:00 or the common “unix epoch”.

Returns the mtime metadata as a FileTime. Enabled only in the filetime feature.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Scrape the references from an impl Read. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.